code

vi /etc/my.cnf

1.找不到初始密码可以在my.ini中[mysqld] 添加:

skip-grant-tables

2.修改MySQL数据库配置文件无密码登录后,修改密码报错:

ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

3.先执行:

flush privileges;

4.再执行修改密码命令,可以了:

set password for root@localhost=password('你的密码');










相关文章:

  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
  • 2022-02-11
  • 2022-02-15
  • 2022-12-23
猜你喜欢
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2021-09-03
  • 2021-09-22
相关资源
相似解决方案