[client]
port = 3360
#socket = /usr/local/mysql/data/mysql.sock
socket=/var/lib/mysql/mysql.sock
default-character-set=utf8
# MySQL server
[mysqld]
port = 3360
character-set-server=utf8
init_connect='SET NAMES utf8'
#datadir=/usr/local/mysql/data
#socket = /usr/local/mysql/data/mysql.sock
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
max-heap-table-size = 64M
thread-concurrency = 16
#ft-min-word-len = 4
#default-storage-engine = INNODB
#transaction-isolation = REPEATABLE-READ
#tmp-table-size = 64M
#bulk-insert-buffer-size = 64M
# *** NETWORK ***
back-log = 50
max-connections = 1024
max-user-connections = 0
max-connect-errors = 10
net_buffer_length = 8K
max-allowed-packet = 16M
# *** SESSION THREAD ***
thread-cache-size = 64
thread-stack = 192K
# *** TABLE CACHE ***
table-open-cache = 2048
sort-buffer-size = 8M
join-buffer-size = 8M
# *** Replication related settings ***
server-id = 1
#binlog-format = mixed
#binlog-cache-size = 32K
#max-binlog-size = 512M
#sync-binlog = 0
#innodb-support-xa = 1
#log-bin = mysql-bin
#log-bin-index = mysql-bin.index
#relay-log = mysql-relay-bin
#relay-log-index = mysql-relay-bin.index
#expire-logs-days = 10
#log-slave-updates = 1
#skip-slave-start
# *** MyISAM Specific options ***
read-buffer-size = 2M
read-rnd-buffer-size = 16M
key-buffer-size = 1024M
myisam-sort-buffer-size = 64M
myisam-max-sort-file-size = 10G
myisam-repair-threads = 1
myisam-recover
# *** INNODB Specific options ***
innodb-buffer-pool-size = 384M
innodb-additional-mem-pool-size = 16M
innodb-log-buffer-size = 8M
innodb-log-file-size = 256M
#innodb-data-file-path = ibdata1:10240M:autoextend
innodb-file-per-table = 1
innodb-thread-concurrency = 16
innodb-flush-log-at-trx-commit = 1
[mysqldump]
quick
max-allowed-packet = 16M
[mysql]
no-auto-rehash
[myisamchk]
key-buffer-size = 512M
sort-buffer-size = 512M
read-buffer = 8M
write-buffer = 8M
[mysqlhotcopy]
interactive-timeout
[mysqld-safe]
open-files-limit = 60000
如果以上配置在第一次启动不了,先清空mysql数据库指定目录下的数据,然后在linux上执行以下命令:
setenforce 0
在重启mysql,此时应能正常启动
阅读(2391) | 评论(0) | 转发(0) |