Site menu:

 

12月 2006
« Nov   Jan »
 123
45678910
11121314151617
18192021222324
25262728293031

分类

最新日志

最新评论

Site search

标签

存档页

Links:

wordpress数据库utf8之路

转化数据库方法按照本站提供的办法

mysqldump -uroot -p –default-character-set=latin1 –set-charset=utf8 –skip-opt dbname > dbname.sql

mysql -p

CREATE DATABASE `newdbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

mysql -uroot -p –default-character-set=utf8 -f  newdbname < dbname.sql

更改WordPress程序中wp-includes/wp-db.php的文件更改

$this->dbh = @mysql_connect($dbhost,$dbuser,$dbpassword);
//加上下面這行
$this->query(”SET NAMES ‘utf8′”);

 wp安装目录下的wp-config.php 文件,把里面数据库相应的参数修改为 新的数据库名字。

Comments

Comment from affluent container
Time 2008年02月21日 at 12:13 上午

I have traveled the length and breadth of this country and talked with the best people, and I can assure you that data processing is a fad that won’t last out the year. The editor in charge of business books for Prentice Hall, 1957
Politicians are like diapers They should be changed often, and for the same reason — Anonymous

The great object is that every man be armed. Everyone who is able might have a gun. PATRICK HENRY, 3 Elliot, Debates at 386.
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter? — Woody Allen

Write a comment