代码如下
UPDATE mao_options SET option_value = replace(option_value, ‘http://www.oldname’,’http://www.newname’) ;
UPDATE mao_posts SET post_content = replace(post_content, ‘http://www.oldname’,’http://www.newname’) ;
UPDATE mao_comments SET comment_content = replace(comment_content, ‘http://www.oldname’, ‘http://www.newname’) ;
UPDATE mao_comments SET comment_author_url = replace(comment_author_url, ‘http://www.oldname’, ‘http://www.newname’) ;