さくらのVPS サーバ構築メモ 6 – MySQL
WordPressで使用するMySQLをインストールする。
# yum -y install mysql-server # mysql_install_db # /etc/rc.d/init.d/mysqld start # chkconfig mysqld on
# vi /etc/my.cnf
設定に下記を追記。
[mysqld] ... character-set-server=utf8 skip-character-set-client-handshake query_cache_limit=1M query_cache_min_res_unit=4k query_cache_size=24M query_cache_type=1 key_buffer = 16M sort_buffer_size = 1M read_buffer_size = 256K
MySQLを再起動。
# /etc/rc.d/init.d/mysqld restart
MySQLに接続し、不要ユーザーの削除、不要DBの削除、WordPressで使用するデータベースの作成を行う。
# mysqladmin -u root password 'パスワード' # mysql -u root -p mysql> mysql> drop database test; //不要DBの削除 mysql> delete from mysql.user where password=''; //不要ユーザーの削除 mysql> flush privileges; //WordPressで使用するデータベースの作成 mysql> create database wordpress; mysql> grant all on wordpress.* to wordpress@localhost identified by 'パスワード'; mysql> exit;








