/etc/init.d/mysql stop
mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
mysql -u root mysql
update user set authentication_string=password('123456') where user='root';
FLUSH PRIVILEGES;
exit;
/etc/init.d/mysql restart
mysql -uroot -p
Enter password: 123456
mysql>
出现上面mysql> 说明成功!
本文标题:CentOS初始化Mysql5.7密码
本文链接:https://blog.quwenai.cn/post/5395.html
版权声明:本文不使用任何协议授权,您可以任何形式自由转载或使用。






还没有评论,来说两句吧...