《MysqL实例MysqL5.7修改root密码教程》要点:
本文介绍了MysqL实例MysqL5.7修改root密码教程,希望对您有用。如果有疑问,可以联系我们。
版本更新,原来user里的password字段已经变更为authentication_stringMysqL必读
版本更新 缘故,好多网上的教程都不适用了,甚至连官网的文档也不是能够顺利 *** 作的.MysqL必读
如果 MysqL 正在运行,首先杀之:MysqL必读
killall -TERM MysqLd.
运行MysqL必读
MysqLd_safe --skip-grant-tables &
如果此时不想被远程连接:MysqLd_safe --skip-grant-tables --skip-networking &MysqL必读
使用MysqL连接serverMysqL必读
更改密码:MysqL必读
update MysqL.user set authentication_string=password('123qwe') where user='root' and Host = 'localhost';
*特别提醒注意的一点是,新版的MysqL数据库下的user表中已经没有Password字段了MysqL必读
而是将加密后的用户密码存储于authentication_string字段MysqL必读
MysqL> flush privileges;MysqL> quit;
修改完毕.重启MysqL必读
killall -TERM MysqLd.MysqLd_safe &
然后MysqL就可以连接了MysqL必读
但是此时 *** 作似乎功能不完全,还要alter user...MysqL必读
alter user 'root'@'localhost' IDentifIEd by '123';
网文说酱紫也可以:MysqL必读
set password for 'root'@'localhost'=password('123');cp MysqL.server /etc/init.d/MysqLchmod +x /etc/init.d/MysqLchkconfig --add MysqL总结
以上是内存溢出为你收集整理的Mysql实例Mysql5.7修改root密码教程全部内容,希望文章能够帮你解决Mysql实例Mysql5.7修改root密码教程所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)