Java321技术网

 找回密码
 立即注册
搜索
热搜: centos
查看: 12837|回复: 0
打印 上一主题 下一主题

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

[复制链接]

126

主题

126

帖子

815

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
815
跳转到指定楼层
楼主
发表于 2017-12-31 16:51:54 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本地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;
回复

使用道具 举报

QQ|Archiver|手机版|小黑屋|Java321技术网   蜀ICP备15030946号-1

GMT+8, 2024-4-24 20:54 , Processed in 0.055445 second(s), 21 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表