As part of the WordPress installation, you must modify the wp-config.php file to define the WordPress configuration settings required to access your MySQL database.This file, wp-config.php, does not exist in a downloaded copy of WordPress; you need to create it. The wp-config-sample.php file is provided as an example to work from. Advanced settings and examples are provided below.
If your hosting provider installed WordPress for you, get the information from them. If you manage your own web server or hosting account, you will have this information as a result of creating the database and user.
在2.1的时候,你已经把wp-config-sample.php改名为wp-config.php,用“记事本”将其打开(右键单击-打开方式-记事本),找到以下代码并进行更改:
// ** MySQL settings ** //
1.define(‘DB_NAME’, ‘wordpress’); // The name of the database
2.define(‘DB_USER’, ‘username’); // Your MySQL username
3.define(‘DB_PASSWORD’, ‘password’); // …and password
4.define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
把“WordPress”改为你在上面建立的数据库名(databasename)
把“usename”改为你在建立数据库时创建的用户名(username)
把“password”改为你在上面为你数据库用户所创建的密码
hostname(主机名)一般情况下不用改
改完上面三项后,保存就可以了。



