1.1错误描述

150610 10:05:13 [Warning] IP address '61.240.144.64' could not be resolved: Name or service not known

MySQL错误专题_MySQL错误专题


1.2解决方法

vi /etc/my.cnf

添加如下内容
【mysqld】
skip_name_resolve  #是否跳过反解析(ip不反解成域名)



1.3通过日志文件可以看出有很多“莫名其妙”的IP在访问数据库,所以需要对这些外来IP做限制

vi /etc/sysconfig/iptables

#删除所有允许访问3306端口的IP
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j DROP

#允许x.x.x.x应用服务器访问
-A INPUT -s x.x.x.x -p tcp --dport 3306 -j ACCEPT

#允许公司IP端访问(公司的IP对应的外网地址)
-A INPUT -s x.x.x.x -p tcp --dport 3306 -j ACCEPT
-A INPUT -s y.y.y.y -p tcp --dport 3306 -j ACCEPT



1.4修改完成iptables文件以后,执行

iptables --flush





2.1错误描述

Error loading schema content
Error Code: 1548 Cannot load from mysql.proc. The table is probably corrupted


2.2出现错误的原因

在MySQL5.1.X升级到MySQL5.5.X的时候,升级完成之后需要更新系统表,而出现以上错误是因为没有更新系统表


2.3解决方法

mysql_upgrade -u root -p