我的mysql运行时占CUP很高,所以就搞了一个记录慢语句的LOG,设定是5秒以上都写入到LOG里几天后发现有2200多条5秒以上的语句其中这条最奇怪,#User@Host:ifacekorea[ifacekorea]@[117.79...
我的mysql运行时占CUP很高,所以就搞了一个记录慢语句的LOG,设定是5秒以上都写入到LOG里
几天后发现有2200多条5秒以上的语句
其中这条最奇怪,
# User@Host: ifacekorea[ifacekorea] @ [117.79.226.183]
# Query_time: 11 Lock_time: 0 Rows_sent: 0 Rows_examined: 3629321985
# administrator command: Init DB;
# User@Host: ifacekorea[ifacekorea] @ [117.79.226.183]
# Query_time: 9 Lock_time: 0 Rows_sent: 0 Rows_examined: 3103438011
# administrator command: Init DB;
# User@Host: ifacekorea[ifacekorea] @ [117.79.226.183]
# Query_time: 19 Lock_time: 0 Rows_sent: 0 Rows_examined: 3492940545
# administrator command: Init DB;
以上是记录的一部分,Init DB;在2200条慢速语句中出现了421次
可是我再mysql手册中找不到,Init DB;这个命令
我在命令行下执行的时候也出现错误!
mysql> explain Init DB;
1146 - Table 'db_iface_com_cn.init' doesn't exist
mysql>
Init DB;
1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Init DB' at line 1
1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Init DB' at line 1
我的环境是WIN2003,PHP,APACHE,出现这个情况是不是我的my.ini设置的有问题?我的msql正常稳定工作起来大概要占270M内存,
服务器的配置是至强双核3.2,内存2G
[mysqld]
basedir=D:/mysql
long_query_time=5
log-slow-queries=e:/www/register/slowsql.log
datadir=D:/mysql/data
set-variable=key_buffer=256M
set-variable=max_connections=1024
set-variable=interactive_timeout=30
set-variable=table_cache=512
set-variable=key_buffer_size=256M
[WinMySQLadmin]
Server=D:/mysql/bin/mysqld-nt.exe
user=new_admin
password=new_admin
wait_timeout = 10
QueryInterval=10
tmp_table_size=200M
query_cache_size=600000
skip-name-resolve
log-slow-queries = D:/mysql/logs/slowquery.log
long_query_time =5
能完美解决的 狂加分!!!!!!
强烈感谢帮助我,给我解答的人
一直在线BAIDU HI等,您的回答我一定第一时间反应,
展开