1.创建远程用户 CREATE USER 'user'@'%' IDENTIFIED BY 'password'; 2.授root权限 GRANT ALL privileges ON *.* TO 'user'@'%'; 3.刷新权限 flush privileges; 4.设置root密码 set password for username@localhost = password('password');
CREATE USER 'user'@'%' IDENTIFIED BY 'password';
GRANT ALL privileges ON *.* TO 'user'@'%';
flush privileges;
set password for username@localhost = password('password');