1、WARNING: The host 'MySQL' could not be looked up with resolveip.
解决:DNS解析与主机名(uname -n)不同造成的,更改hosts文件即可
如:vi /etc/hosts
添加MySQL
2、ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
首先检查/tmp目录下是否有mysql.sock。
没有就创建一个软连接。
如:ln /home/cec/mysql/mysql.sock /tmp/mysql.sock
3、客户端连接数据库,提示需要mysqladmin flush-hosts
解决:./mysqladmin flush-hosts -uroot -p