mysql開啟遠端連線

2021-10-10 10:55:37 字數 894 閱讀 3070

進入mysql:

mysql -uroot -p你的mysql密碼
執行mysql:

use mysql;
開啟遠端訪問許可權:

grant all privileges on *.* to 'root'@'%' identified by 'amigo'
**強制重新整理許可權: **

flush privileges;
退出mysql:

exit;
進入mysql:

mysql -uroot -p你的mysql密碼
執行mysql:

use mysql;
檢視使用者表:

select `host`,`user` from user;
更新使用者表:

update user set `host` = '%' where `user` = 'root' limit 1;
**強制重新整理許可權: **

flush privileges;
退出mysql:

exit;
如果以上兩種方法都沒用,就去檢視防火牆是否關閉!

mysql開啟遠端 mysql 開啟遠端連線

1045,access denied for user root 192.168.100.1 using password yes 開啟資料庫遠端連線即可 1 先在本機使用root使用者登入mysql,然後進行授權。mysql grant all privileges on to root iden...

開啟mysql遠端連線

首先新增使用者 當然也可是使用root使用者 格式 grant 許可權 on 資料庫名.表名 使用者 登入主機 identified by 使用者密碼 grant select,update,insert,delete on to zhxia identified by 123456 或者所有許可權...

開啟mysql遠端連線

在mysql控制台執行 grant all privileges on to root identified by mypassword with grant option 在mysql控制台執行命令中的 root 可以這樣理解 root是使用者名稱,是主機名或ip位址,這裡的 代表任意主機或ip位...