mysql登錄問題

本機登錄不上加上這個 先停止mysql 服務 添加

/bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql --skip-grant-tables  

 

--skip-networking  跳過監聽端口  啓動mysql 不會啓動監聽接口

 

登錄  修改mysql 密碼

-- update user set password=PASSWORD("bugfree") where user='bugfree';

-- UPDATE user SET PASSWORD=MD5('123456') WHERE USER='root' and HOST='%';

 

遠程訪問

my.cnf

bind-address = 0.0.0.0   所有ip能訪問 

my.cnf  locate my.cnf 找位置

發佈了27 篇原創文章 · 獲贊 3 · 訪問量 12萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章