mysql常見問題解決方案.

來源:互聯網
上載者:User

標籤:

1. 問題:mysql啟動報錯(linux)

[[email protected] ~]# service mysqld restart

Another MySQL daemon already running with the same unix socket.
Starting mysqld: [FAILED]

解決方案:

[[email protected]~] mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

[[email protected]~]# service mysqld restart

 

2. 問題:navicat串連mysql:報1130錯誤(windons)

1130: Hostxxx.xxx.xxx.xxx  is not allowedto connect to this MySQL server  

解決方案:

mysql>use mysql
mysql>update user set host = ‘%‘  where user =‘root‘;
mysql>flush privileges;
mysql>select ‘host‘,‘user‘ from user where user=‘root‘;
mysql>quit

 

3. 問題: navicat串連mysql:報1045錯誤

1045  Access denied foruser ‘root‘@‘localhost‘ (using password:YES) 

解決方案:

/etc/init.d/mysqld stop
mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(‘123456‘) where USER=‘root‘;

(UPDATEuser SET Password=PASSWORD(‘123456‘) where USER=‘root‘ and host=‘root‘ orhost=‘localhost‘;)

mysql> FLUSH PRIVILEGES;
mysql> quit

 /etc/init.d/mysqld restart

 

4. 問題: navicat串連mysql:報10060錯誤

Can‘t connect to MySQL server (10060)

解決方案:

http://database.51cto.com/art/201107/274565.htm(重點檢查3306連接埠是否已經開放

 

5. 問題:如何建立其他帳號遠端連線mysql伺服器

mysql>usemysql
mysql>GRANT ALL PRIVILEGES ON *.* TO ‘sems_mysql‘@‘%‘ IDENTIFIED BY ‘gziscassems‘ WITH GRANT OPTION;  

 

6. 問題:navicat串連mysql:報10061錯誤

2003-can.t connect to MySQL server on xxx.xxx.xxx.xxx (10061)

解決方案:

啟動mysql服務

[[email protected] ~]# service mysqld start

 

問題:navicat串連mysql:報ERROR 1044(42000): Access denied for user ‘‘@‘localhost‘ to database ‘mysql‘

/etc/init.d/mysqldstop
mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
mysql -u root mysql

mysql> delete from user where USER=‘‘;
mysql> FLUSH PRIVILEGES;//記得要這句話,否則如果關閉先前的終端,又會出現原來的錯誤
mysql> quit

mysql常見問題解決方案.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.