ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
猜想可能是服務未啟動,啟動MySQL服務
先執行mysqld --install ,再執行net start mysql
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqld-nt --skip-grant-tables
111230 10:45:14 [ERROR] Can't find messagefile 'D:\Program Files\MySQL\MySQL Server 5.0\share\english\errmsg.sys'
111230 10:45:14 [ERROR] Aborting
解決方法:將MySQL Server\bin下的my.ini刪除或修改(我將其改了個名字,後來MySQL資料庫可用之後,我又將其還原了),再執行:
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqld-nt --skip-grant-tables
開啟另一個cmd視窗,輸入mysql
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql
修改密碼
mysql> use mysql
mysql> update user set password=password("123456")
-> where user ="root";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings:
先執行mysqld --install ,再執行net start mysql
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqld-nt --skip-grant-tables
111230 10:45:14 [ERROR] Can't find messagefile 'D:\Program Files\MySQL\MySQL Server 5.0\share\english\errmsg.sys'
111230 10:45:14 [ERROR] Aborting
解決方法:將MySQL Server\bin下的my.ini刪除或修改(我將其改了個名字,後來MySQL資料庫可用之後,我又將其還原了),再執行:
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqld-nt --skip-grant-tables
開啟另一個cmd視窗,輸入mysql
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql
修改密碼
mysql> use mysql
mysql> update user set password=password("123456")
-> where user ="root";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10314474/viewspace-714870/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ERROR 2003 (HY000)Can't connect to MySQL server on '192.168.8.247' (113)ErrorMySqlServer
- MySQL問題記錄--Can't connect to MySQL server on localhost (10061)解決方法MySqlServerlocalhost
- MySQL報錯'ERROR 2002 (HY000): Can't connect to local MySQL server through'MySqlErrorServer
- ERROR 2002 (HY000): Can't connect server socket /tmp/mysql.sockErrorServerMySql
- MYSQL ERROR 2003 (HY000) CanMySqlError
- MySQL 2003 - Can’t connect to MySQL server on (10060)MySqlServer
- Navicat 連線 MySQL 失敗:2002-can‘t connect to server on localhost(10061)問題解決MySqlServerlocalhost
- ERROR 2002(HY000):Can't connect to local MySQL socket '/tmp/mysql.sock'ErrorMySql
- Can't Connect to MySQL Server on IP Address (10061) 錯誤的解決方案MySqlServer
- ERROR 2002 (HY000): Can't connect server socket /var/run/mysqld/mysqld.sockErrorServerMySql
- mysql can't connect error about privilege----not root userMySqlError
- mysqldump: Got error: 2002: Can't connect to local MySQL server through.....MySqlGoErrorServer
- MySQL連線提示Can't connect to local MySQL server through socketMySqlServer
- Can't connect to local MySQL server through socket '/tmp/mysql.sock'MySqlServer
- MySQL遠端連線ERROR 2003 (HY000) Cant connect to MySQL server on (10060)MySqlErrorServer
- linux下連線mysql報錯ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysqLinuxMySqlErrorServer
- 異常:Can't connect to MySQL server (10060)MySqlServer
- Host 'localhost' is not allowed to connect to this MySQL serverlocalhostMySqlServer
- 【MySQL】ERROR 1005 (HY000): Can't create table' (errno: 150)MySqlError
- 連線MySQL錯誤:Can't connect to MySQL server (10060)MySqlServer
- 解決Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) "MySqlServer
- [jenkins]Can’t connect to window server – not enough permissionsJenkinsServer
- ERROR 1135 (HY000): Can't create a new threadErrorthread
- MySQL 5.5 原始碼安裝報錯"[ERROR] Can't start server"MySql原始碼ErrorServer
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock錯誤MySqlServer
- Can't connect to X11 window server usingServer
- [ERROR] Can't open the mysql.plugin tableErrorMySqlPlugin
- MySQL 5.5 關閉資料庫報錯"Can't connect to local MySQL server through socket"MySql資料庫Server
- MySQL "ERROR 1010(HY000):Error dropping database(canMySqlErrorDatabase
- MySQL 5.7向表匯入資料包錯"ERROR 13 (HY000): Can't get stat of"MySqlError
- 更換mysql資料目錄後出現ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 的解決辦法MySqlErrorServer
- Error:Can't connect to SOCKS proxy:Connection refused (Connection refused)Error
- ERROR 1135 (HY000): Can't create a new thread (errno 11)Errorthread
- 【linux】Can't connect to MySQL server on 'XXX' (13)問題解決方式LinuxMySqlServer
- mysql [ERROR] Can't create IP socket: Permission deniedMySqlError
- Can't connect to X11 window server using DISPLAY variableServer
- mysql 啟動報錯Can't connect to local MySQL server through socket '/data/mysql/mysql/mysql.sock'(111)MySqlServer
- Mysql連線錯誤ERROR 2003 (HY000)MySqlError