贴一份优化配置,备查
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
tmp_table_size=200M
max_tmp_tables=100
back_log = 384
key_buffer_size = 256M
max_allowed_packet = 4M
thread_stack = 256K
table_cache = 128K
sort_buffer_size = 64M
read_buffer_size = 64M
join_buffer_size = 64M
myisam_sort_buffer_size = 128M
table_cache = 512
thread_cache = 16
query_cache_size = 512M
query_cache_size = 64M
max_connections = 768
wait_timeout = 20
interactive_timeout = 20
thread_concurrency = 8
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
# old_passwords=1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
这个数据库也要优化的啊?