hnbiao

1.MySql安装错误代码1045的解决方案

2.root密码忘记1045的解决方案

 

错误代码 1045
Access denied for user \'root\'@\'localhost\' (using password:YES)

 

 

Windows:
1. 管理员登陆系统,停止mysql服务或者结束mysqld-nt进程
2. 进入命令行,来到mysql的安装目录.假设安装目录为 d:\mysql\ , CMD进入命令行
3. 运行 d:\mysql\bin\mysqld -nt --skip-grant-tables 启动mysql,关闭权限的检查
4. 运行 d:\mysql\bin\mysqladmin -u root flush-privileges password "newpassword" 重设root密码
5. 重新启动mysql服务

 

方法:

1, 启用任务管理器,结束mysql进程
 
2,进入命令行,进入mysql的bin目录(<环境变里>path里面可以找到bin目录)启动mysql服务:
mysqld -nt --skip-grant-tables  (以不检查权限的方式启动);
(可能会出现:120705 17:41:14 [Warning] option \'new\': boolean value \'t\' wasn\'t recognized. Set to OFF.不过依然可以继续。)
 

 

3,重新打开一个命令提示窗口
   输入:mysql -uroot
 
4, 修改root密码:
   update mysql.user set password=PASSWORD(\'222222\') where User=\'root\';
5, flush privileges;
6, quit
重新连接mysql
 
 
 
 
 
 
 
 

分类:

技术点:

相关文章:

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