解决mysal出错问题
时间:2006-12-14 来源:rockylinux
安装MySql出错信息,郁闷了一个晚上,终于解决了,一下是出错信息:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost init.d]# mysql_install_db
Neither host 'localhost' nor 'localhost' could be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
解决办法是:
hostname 127.0.0.1,这样再次启动service mysqld start就可以了,终于跑起来了,高兴,现在phpmyadmin也能够用了,下一步该往下开发了。
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost init.d]# mysql_install_db
Neither host 'localhost' nor 'localhost' could be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
解决办法是:
hostname 127.0.0.1,这样再次启动service mysqld start就可以了,终于跑起来了,高兴,现在phpmyadmin也能够用了,下一步该往下开发了。
相关阅读 更多 +