wordpressのためにmysqlの設定
/usr/share/doc/wordpress-2.1.2/README.fedora
をみながら、mysqlの設定をします。yumをつかってwordpressをインストールしたので、必要なものは全部そろっています。mysqldが動いていることを確認
#service mysqld status
動いていなければ
#service mysqld start
しておきます。つぎにwordpressのための「データベース名」「ユーザー名」「パスワード」を決めます。
データベース名 -> wpdb1
ユーザー名 -> wpuser1
パスワード -> wppass1
と決めます。README.fedoraでは、全てwordpressにした例が書いてあるので、読み替えます。こんな感じ
# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 142 to server version: 5.0.27
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database wpdb1;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on wpdb1.* to wpuser1@localhost identified by 'wppass1';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected, 1 warning (0.00 sec)
こんな感じ。grant ~ の部分は環境によりwpuser1@localhostを wpuser1@'%'とかwpuser1.*などにしないとだめみたいです。自分はwpuser1@localhostだと都合が良いようです。
Comments