mysql設定遠端訪問處理

2021-10-10 02:38:37 字數 392 閱讀 4584

mysql 8.0已經不支援下面這種命令寫法

grant all privileges on *.* to root@"%" identified by ".";

模板: grant all privileges on 庫名.表名 to '使用者名稱'@'ip位址' identified by '密碼' with grant option; flush privileges;

正確的寫法是先建立使用者

create user 'root'@'%' identified by '123456!';

再給使用者授權

grant all privileges on *.* to 'root'@'%' ;

flush privileges;//重新整理系統許可權表

MySQL 設定遠端訪問

mysql遠端訪問,也就是通過ip訪問mysql服務,mysql對於安全的要求是非常嚴格的,需要授權。1.本地訪問 sql grantallprivilegeson toadmin localhost identifiedby admin withgrantoption flushprivilege...

mysql設定遠端訪問

1.使用命令 mysql u 使用者名稱 p密碼,登入mysql 2.執行命令 grant all privileges on to root identified by zmp 123456 with grant option 3.執行命令 flush privileges 4.執行命令 exit...

mysql設定遠端訪問

步驟3 配置遠端訪問mysql 修改 mysql 的配置檔案,執行如下命令 sudo vi etc mysql mysql.conf.d mysqld.cnf 43 注意 其他 linux系統 可能在 etc mysql my.cnf 找到 bind address 127.0.0.1 這一行要注釋...