- 论坛徽章:
- 0
|
本帖最后由 ashuma 于 2014-06-17 16:42 编辑
我目前使用的是一款云服务器,内存为1G,cenots 6.5 64位,mysql 5.6 64位,apache 2.2, php 5.5,服务器上现在运行的magento商城系统,我的my.cnf是这样设置的:
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
skip-grant-tables
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-external-locking
skip-name-resolve
key_buffer_size = 256M
max_allowed_packet = 64M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 2M
myisam_sort_buffer_size = 8M
thread_cache_size = 8
query_cache_size= 16M
thread_concurrency = 8
max_connections = 300
wait_timeout = 2880000
interactive_timeout = 2880000
max_connect_errors = 9
long_query_time = 1
tmp_table_size = 16M
tmpdir = /tmp
innodb_use_sys_malloc =0
#log-bin=mysql-bin
#binlog_format=mixed
#server-id = 1
[mysqldump]
quick
max_allowed_packet = 8M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 12M
sort_buffer_size = 1M
read_buffer = 1M
write_buffer = 1M
[mysqlhotcopy]
interactive-timeout
现在是一天之类,mysql会自动关闭几次,每次要重新启动服务器才能启动mysql。
我先请教下,my.cnf该怎么设置,才能解决这个问题呢?
我的商城刚建好,在测试阶段,基本没有流量的问题。
服务器上另外搭建了一个企业展示网站,用的是MYISAM。
以后还会搭建一个论坛程序,准备用dz或者phpwind。
谢谢。 |
|