●バックアップの取得 [root@db2 ~]# cp -p /etc/my.cnf /etc/my.cnf.bak ●my.cnfの設定 以下の内容に変更する。 [root@db2 ~]# cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 #log=/var/log/mysql_query.log port = 3306 skip-locking key_buffer = 256M max_allowed_packet = 1M table_cache = 256 sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M thread_cache_size = 8 query_cache_size= 16M # Try number of CPU's*2 for thread_concurrency thread_concurrency = 8 max_connections = 512 default-character-set = sjis #skip-character-set-client-handshake # Disable Federated by default skip-federated # Replication Master Server (default) # binary logging is required for replication log-bin=mysql-bin # required unique id between 1 and 2^32 - 1 # defaults to 1 if master-host is not set # but will not function as a master if omitted server-id = 1 # Disabling symbolic-links is recommended to prevent assorted security risks; # to do so, uncomment this line: # symbolic-links=0 ################################################## #log-slow-queries=/var/log/mysql-slow.log #long-query-time=2 #log-queries-not-using-indexes #log-slow-admin-statements ################################################# [mysqldump] quick max_allowed_packet = 16M default-character-set = sjis [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates default-character-set = sjis [isamchk] key_buffer = 128M sort_buffer_size = 128M read_buffer = 2M write_buffer = 2M [myisamchk] key_buffer = 128M sort_buffer_size = 128M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout [mysqld_safe] log-error=/var/log/mysqld.log #log=/var/log/mysql_query.log pid-file=/var/run/mysqld/mysqld.pid port = 3306 skip-locking key_buffer = 256M max_allowed_packet = 1M table_cache = 256 sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M thread_cache_size = 8 query_cache_size= 16M # Try number of CPU's*2 for thread_concurrency thread_concurrency = 8 max_connections = 512 default-character-set = sjis ●MySQL再起動 [root@db2 ~]# /etc/init.d/mysqld restart Stopping MySQL: [ OK ] Starting MySQL: [ OK ]