mysql启动问题access denied for user 'root'@'localhost'(using password:YES)
来源:互联网 发布:薛之谦主持的网络综艺 编辑:程序博客网 时间:2024/04/30 11:38
安装Mysql后利用SQLyogEnt启动是提示“access denied for user 'root'@'localhost'(using password:YES)”,开始我还为是因为是密码问题,后来上网查了查才知道root权限问题,我想可能是因为win7系统我在安装时没用以管理员身份进行安装,所以root角色没有权限,从网上找了一个解决方案解决了,在这里记录一下:
1. 管理员登陆系统,停止mysql服务或者结束mysqld-nt进程;
2. 进入命令行,来到mysql的安装目录.假设安装目录为 d:\mysql\ , CMD进入命令行;
3. 运行 D:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld-nt --skip-grant-tables启动mysql,关闭权限的检查;
4. 运行 D:\Program Files\MySQL\MySQL Server 5.5\bin\mysqladmin -u root flush-privileges password "newpassword" 重设root密码;
5. 重新启动mysql服务;
——————————————————————————
解决方案:
1、打开MySQL目录下的my.ini文件,在文件的最后添加一行“skip-grant-tables”,保存并关闭文件。
2、重启MySQL服务。
3、在命令行中输入“mysql -u root -p”(不输入密码),回车即可进入数据库。
4、执行,“use mysql;”使用mysql数据库。
5、执行,“update user set password=PASSWORD("rootadmin") where user='root';”(修改root的密码)
(期间我还select下user表中的记录,查询全部的时候显示了一些乱码,然后我只查询了user表中的Host、User、Password字段,貌似当时显示了3条记录,有1个没有名称。当然,为了解决问题,这些我也管不了了。)
6、打开MySQL目录下的my.ini文件,删除最后一行的“skip-grant-tables”,保存并关闭文件。
7、重启MySQL服务。
8、在命令行中输入“mysql -u root -p rootadmin”,问题搞定!
0 0
- mysql启动问题access denied for user 'root'@'localhost'(using password:YES)
- mysql启动问题access denied for user 'root'@'localhost'(using password:YES)
- mysql启动问题access denied for user 'root'@'localhost'(using password:YES)
- mysql启动问题access denied for user 'root'@'localhost'(using password:YES)
- mysql启动问题access denied for user 'root'@'localhost'(using password:YES)
- mysql启动问题access denied for user 'root'@'localhost'(using password:YES)
- mysql Access denied for user 'root'@'localhost' (using password: YES)
- mysql Access denied for user 'root'@'localhost' (using password: YES)
- MySql Access denied for user 'root'@'localhost' (using password: YES)
- mysql access denied for user'root'@'localhost' using password yes
- mysql Access denied for user 'root'@'localhost' (using password: YES)
- mysql:Access denied for user 'root'@'localhost' (using password:YES)
- MySQL:Access denied for user 'root'@'localhost' (using password:YES)
- mysql启动提示 access denied for user root@localhost(using password:YES) 解决办法总结
- mysql启动提示 access denied for user root@localhost(using password:YES)
- MySQL问题 Access denied for user 'root'@'localhost' (using password: YES)
- mysql 安装问题 access denied for user 'root'@'localhost' using password yes/no
- 解决MySQL #1045 - Access denied for user 'root'@'localhost' (using password: YES) 的问题
- MySQL常见错误代码说明
- 耳机工程师谈Dirac: Dirac开创了用软件来实现HIFI的新思路
- POJ 3067—— Japan(树状数组)
- Ubuntu中CodeLite设置为中文
- 识别“百度权重”作弊的方法
- mysql启动问题access denied for user 'root'@'localhost'(using password:YES)
- ural Threeprime Numbers(dp)
- shell脚本不换行刷新数据
- js综合能力提升 继承prototype
- 求解线性同余方程组
- 数据库的分页查询
- 经典背包问题 01背包+完全背包+多重背包
- 排列组合算法
- 【WEB基础】②js控制表单提交