1.登录root账号
su

2.启动MySQL服务
systemctl start mysql

3.启动MySQL服务(安全方式)
mysqld_safe --user=mysql &

4.登录MySQL
mysql -u root #无密码
mysql -u root -p #有密码

5.修改指定服务端的密码。
mysql> update mysql.user set authentication_string=password('我的密码') where user='root' and Host = 'localhost';

 

相关文章:

  • 2022-12-23
  • 2022-01-21
  • 2021-08-19
  • 2021-04-17
  • 2021-05-06
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
猜你喜欢
  • 2022-01-09
  • 2021-10-04
  • 2021-09-04
  • 2022-12-23
  • 2021-05-17
  • 2021-11-21
相关资源
相似解决方案