luozhangyou 发表于 2017-12-31 16:51:54

centos系统mysql修改远程登录密码与本地密码

本地root密码:

update user set password=password("密码xxxx") where user="root";

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');


flush privileges;

设置远程帐号密码:

GRANT ALL PRIVILEGES ON *.* TO '远程帐号xxx'@'%'IDENTIFIED BY '密码xxxx' WITH GRANT OPTION;

flush privileges;
页: [1]
查看完整版本: centos系统mysql修改远程登录密码与本地密码