Linux 下 Mysql error 2002 錯誤解決
先查看 /etc/rc.d/init.d/mysqld status 查看mysql是否已經啟動.
如果啟動的的話,先將數據庫停止 kill mysql的進程id
[root@localhost beinan]#chown -R mysql:mysql /var/lib/mysql
[root@localhost beinan]# /etc/init.d/mysqld start
啟動 MySQL: [ 確定 ]
[root@localhost lib]# mysqladmin -uroot password '123456'
[root@localhost 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!