開放Mysql8外部訪問許可權

2022-04-19 04:19:27 字數 492 閱讀 7062

最近使用sql工具連線伺服器mysql出現

(1045, "access denied for user 'root 'ip號碼' (using password: yes)")

錯誤,檢視過埠3306是否開放 以及雲伺服器安全組是否配置3306埠後,感覺是mysql8沒有開放外部訪問,

查詢網上大多教程是針對mysql5.7的,直接執行

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

會出現以下是mysql版本8.0.11正確的寫法:

use mysql;

desc user;

select host,user from user;

flush privileges;

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

然後就可以使用外部訪問了

MySQL8 許可權驗證

8.0修改了預設驗證方式,之前使用mysql native password外掛程式,新版使用caching sha2 password 驗證外掛程式兩個外掛程式並不相容,使用8版本之後要留意驗證問題。第一次登入後需要reset password才能操作 flush privileges alter...

mysql 8 使用者許可權操作

mysql8.0新增使用者和許可權 使用mysql資料庫 use mysql 建立使用者 create user myuser identified by mypass 檢視使用者 select user,host,authentication string from user where user...

Linux下MySql開放訪問許可權

在linux下安裝完資料庫後,區域網內無法訪問。設定方法 1.停止mysql,進入 etc mysql 編輯my.cnf,找到bind address的配置,改為0.0.0.0,然後啟動mysql 2.登入mysql,進入mysql資料庫,執行update user set host where h...