MySql遠端連線的設定問題

2021-12-29 23:32:50 字數 591 閱讀 3606

1。改表法。

可能是你的帳號不允許從遠端登陸,只能在localhost。這個時候只要在localhost的那台電腦,登入mysql後,更改 "mysql" 資料庫裡的 "user" 表裡的 "host" 項,從"localhost"改稱"%"

mysql -u root -pvmwaremysql>use mysql;mysql>update user set host = '%' where user = 'root';mysql>select host, user from user;

2. 授權法。

例如,你想myuser使用mypassword從任何主機連線到mysql伺服器的話。

grant all privileges on *.* to 'myuser'@'%' identified by 'mypassword' with grant option;如果你想允許使用者myuser從ip為192.168.1.3的主機連線到mysql伺服器,並使用mypassword作為密碼 grant all privileges on *.* to 'myuser'@'192.168.1.3' identified by 'mypassword' with grant option;

mysql遠端連線設定 MySQL遠端連線設定

這只是乙個簡單mysql設定。但很多圖簡單,卻忽略了安全性。所以對設定中的細節和含義需要弄到清清楚楚才行。這只是乙個簡單mysql設定。但很多圖簡單,卻忽略了安全性。所以對設定中的細節和含義需要弄到清清楚楚才行。mysql遠端連線的設定問題 下面是步驟 1 登陸本地的mysql server mys...

mysql 設定遠端連線

授權法 grant select,insert,update,delete,create,drop on tablename.to username localhost identified by password 注意 tablename 你自己資料庫的名字,username 連線庫使用者名稱,l...

mysql設定遠端連線

1,開啟mysql遠端連線 1,獲取root許可權 sudo i 2,cd到配置檔案所在路徑 cd etc mysql mysql.conf.d 3,vi mysqld.cnf bind address 127.0.0.1 瀏覽模式 a 插入模式 esc 瀏覽模式 shift 命令列模式 wq 儲存...