您的位置:首页 > 运维架构 > Linux

CentOS初始化Mysql5.7密码

2015-12-14 22:28 543 查看
/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> 说明成功!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: