需要一些帮助.我在堆栈和
mysql的网站上查看了这里的主题,并没有任何配置对我有用.我需要启用
MySQL慢查询日志以及常规查询日志.我想在我的配置文件而不是SET语句中这样做,因为我认为每当重启mysql时都会重置?
我错过了什么?!每个网站都说完全不同的东西……我正在使用MySQL 5.5.15.这是我目前的配置:
[mysqld]
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
skip-external-locking
query_cache_limit=8M
query_cache_size=64M
query_cache_type=1
long_query_time=2
slow_query_log_file=/var/log/mysqld.slow.log
max_connections=100
max_user_connections=10
interactive_timeout=20
wait_timeout=20
connect_timeout=6
thread_cache_size=128
key_buffer=16M
key_buffer_size=256M
join_buffer=1M
max_allowed_packet=16M
table_cache=1024
read_buffer_size=2M
sort_buffer_size=2M
max_connect_errors=10
# Try number of CPU's*2 for thread_concurrency
thread_concurrency=4
myisam_sort_buffer_size=64M
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid