安装 mysql

第一次登陆修改密码

ALTER user ‘root‘@‘localhost‘ IDENTIFIED BY ‘12345678‘;

开启远程访问权限

CREATE USER ‘root‘@‘%‘ IDENTIFIED BY ‘你的密码‘;
GRANT ALL ON *.* TO ‘root‘@‘%‘;
ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘你的密码‘;

FLUSH PRIVILEGES;

相关推荐