mysql5.7.9在安装完成后会,root用户会产生一个不为空的初始密码,登陆mysql就会产生问题了,有必要修改一下登陆密码:

这是从网上找的一个方法,加以总结得出来的,亲测可以:
# /etc/init.d/mysql stop 
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking & 
# mysql -u root mysql 
mysql>update mysql.user set authentication_string=password('321321') where user='abc' and Host = 'localhost';

mysql> quit 

# /etc/init.d/mysql restart 
# mysql -uroot -p 
Enter password: <输入新设的密码newpassword> 
mysql> 

相关文章:

  • 2021-08-19
  • 2022-02-21
  • 2021-12-02
  • 2022-12-23
  • 2021-11-20
  • 2022-01-13
  • 2021-05-30
  • 2021-09-07
猜你喜欢
  • 2021-12-07
  • 2022-01-06
  • 2021-05-03
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
相关资源
相似解决方案