MySQL8 許可權驗證

2021-10-07 06:03:02 字數 723 閱讀 7825

8.0修改了預設驗證方式,之前使用mysql_native_password外掛程式,新版使用caching_sha2_password 驗證外掛程式兩個外掛程式並不相容,使用8版本之後要留意驗證問題。

第一次登入後需要reset password才能操作

flush privileges;

alter user user() identified by '123456.com';

flush privileges;

set global validate_password.policy=0;

set global validate_password.length=1;

alter user user() identified by '123456.com';

flush privileges;

當前很多連線工具還沒有公升級,為了相容舊版本建議修改回原來的驗證外掛程式在my.cnf檔案中預設有下面的語句,新增到my.cnf

default-authentication-plugin=mysql_native_password

alter user 'root'@'%' identified with mysql_native_password by 'yourpassword';

flush privileges;

檢視select user, host, plugin, authentication_string from mysql.user;

mysql 8 使用者許可權操作

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

開放Mysql8外部訪問許可權

最近使用sql工具連線伺服器mysql出現 1045,access denied for user root ip號碼 using password yes 錯誤,檢視過埠3306是否開放 以及雲伺服器安全組是否配置3306埠後,感覺是mysql8沒有開放外部訪問,查詢網上大多教程是針對mysql5...

mysql 密碼驗證 MySQL8 的密碼認證

mysql8 的密碼認證 1 wordpress 也就是php 中連線 mysql8 問題是安裝 wordpress 時,mysql 伺服器連線不上。檢查了一下原因,原來伺服器上使用的是 mysql8 新版本伺服器。估計原因就是密碼的認證方式問題,因此更新使用者密碼,使用語句 alter user ...