centos7 開啟 mysql8 遠端控制

2022-06-28 20:39:11 字數 916 閱讀 8853

mysql8.x密碼的認證方式變了,需要修改遠端認證方式

方法1create user 'root'@'%' identified with mysql_native_password  by '123123';      //修改密碼認證方式為mysql_native_password

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

mysql> create user 'root'@'%' identified with mysql_native_password  by '123123';  # 執行此命令後在遠端使用root賬戶登入,密碼為123456

mysql> grant all on *.* to 'root'@'%'; # 授權

mysql> flush privileges; # 重新整理

方法2create user 'root'@'%' identified by '123123';     //預設的密碼認證外掛程式caching_sha2_password

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

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

mysql> create user 'root'@'%' identified by '123456';  # 執行此命令後在遠端使用root賬戶登入,密碼為123456

mysql> grant all on *.* to 'root'@'%'; # 授權

mysql> alter user 'root'@'%' identified with mysql_native_password by '123456';

mysql> flush privileges; # 重新整理

centos 7安裝mysql 8教程

mysql日誌目錄 var log mysqld.log 啟動命令 systemctl start mysqld.service 注意 mysql 8 預設設定是區分表名大小寫的。在初始化的時候設定 lower case table names 1才有效!在初始化的時候設定 lower case t...

阿里雲Centos7安裝mysql8

centos7,mysql 8.0.15 1.el7.x86 64.rpm bundle.tar,xshell 6,xftp 6 mysqld initialize 若報這個異常error while loading shared libraries libaio.so.1 cannot open ...

centos7安裝mysql8完美教程

centos7安裝mysql8完美教程 配置mysql 1.剛剛啟動成功之後,用命令檢視預設密碼並且登入 檢視 cat var log mysqld.log grep password 登陸 mysql u root p 然後輸入密碼 2.修改密碼 set global validate passw...