Mysql8 改密 远程连接
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Root_666666';
然后创建远程访问
CREATE USER 'root'@'%' IDENTIFIED BY 'Root_123456';
GRANT ALL ON *.* TO 'root'@'%';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'Root_123456';
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Root_666666';
然后创建远程访问
CREATE USER 'root'@'%' IDENTIFIED BY 'Root_123456';
GRANT ALL ON *.* TO 'root'@'%';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'Root_123456';