Navicat無法連接mysql8.0的解決方法
時(shí)間:2023年11月24日
瀏覽:次
使用MySQL客戶端Navicat連接數(shù)據(jù)庫(kù)MySQL8.0,MySQL8.0 之前的版本中加密規(guī)則是mysql_native_password,而MySQL8.0,加密規(guī)則是caching_sha2_password
在DOS下登錄mysql,再執(zhí)行以下代碼即可:
alter
user 'root'@'localhost'
identified by
'新密碼'
password expire never;
alter user 'root'@'localhost' identified with mysql_native_password by '新密碼';
alter user 'root'@'localhost' identified with mysql_native_password by '新密碼';