一般mysql大家都知道的特别占内存的 有些穷站长用64m的建站 mysql根本没有办法玩,今天写个优化方案给大家。
vi?/etc/my.cnf
也可以利用winscp之类的软件
优化内容如下
[mysqld] port = 3306 socket = /var/run/mysqld/mysqld.sock skip-locking key_buffer = 16K query_cache_limit = 256K query_cache_size = 4M max_allowed_packet = 1M table_cache = 8 max_connections = 16 thread_concurrency = 2 sort_buffer_size = 64K read_buffer_size = 256K read_rnd_buffer_size = 256K net_buffer_length = 2K thread_stack = 64K skip-bdb skip-innodb [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash #safe-updates [isamchk] key_buffer = 8M sort_buffer_size = 8M [myisamchk] key_buffer = 8M sort_buffer_size = 8M [mysqlhotcopy] interactive-timeout