linux MySQL修改初始密码

跳过安全权限
mysql/bin/mysqld_safe --skip-grant-tables&
mysql -u root mysql
mysql>use mysql
mysql> UPDATE user SET authentication_string=PASSWORD(“new password”) WHERE user=‘root’;
#5.7.22 以前等密码字段password
#更新权限
mysql> FLUSH PRIVILEGES;
#退出编辑
mysql>quit;
重启mysql
service mysql reload

猜你喜欢

转载自blog.csdn.net/m0_37522678/article/details/90174120
今日推荐