sqlyog連centos中xmapp下mysql。

來源:互聯網
上載者:User

標籤:blog   http   io   ar   os   sp   for   java   on   

3.虛擬機器centos,用xampp整合安裝mysql後,本機用sqlyog連時,錯誤:

錯誤碼 1130:Host ‘192.168.0.1’ is not allowed to connect to this mysql server

2.虛擬機器用登入mysql,錯誤:

ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (2)

 

1.[[email protected] htdocs]# find / -name mysql.sock
/opt/lampp/var/mysql/mysql.sock

0.[[email protected] run]# ln -s /opt/lampp/var/mysql/mysql.sock /var/lib/mysql/mysql.sock

2.虛擬機器可以登入mysql

3.本機再次sqlyog連時,仍有報錯

4.參考百度的解決辦法:“登入mysql後,更改 "mysql" 資料庫裡的 "user" 表裡的 "host" 項,從"localhost"改稱"%"”

5.mysql> update user set Host=‘%‘ where user=‘root‘;
ERROR 1062 (23000): Duplicate entry ‘%-root‘ for key ‘PRIMARY‘

6.參考百度的解決辦法:select * from user where Host=‘%‘;  有一個%的記錄。

----mysql> flush privileges;
Query OK, 0 rows affected (0.08 sec)

7.本機再次sqlyog連時,connection successful!!!

sqlyog連centos中xmapp下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.