Linux 下 Mysql error 2002 错误解决

先查看 /etc/rc.d/init.d/mysqld status 查看mysql是否已经启动.

如果启动的的话,先将停止 kill 的进程id

[[email protected] beinan]#chown -R mysql:mysql /var/lib/mysql
[[email protected] beinan]# /etc/init.d/mysqld start
启动 MySQL: [ 确定 ]

[[email protected] lib]# mysqladmin -uroot password '123456'
[[email protected] lib]# mysql -uroot -p --登录数据库
Enter password:

Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 3 to server version: 4.1.11
Type 'help;' or '/h' for help. Type '/c' to clear the buffe

OK!