238,安装mysql出现Access denied for user 'root'@'localhost' (using password: YES)的问题
来源:互联网 发布:沪深300指数基金 知乎 编辑:程序博客网 时间:2024/06/09 16:51
问题:Access denied for user 'root'@'localhost' (using password: YES),使用root连接,权限不够,修改好后,还报了root密码过期。
解决方案:
1,先等了mysql 的服务
2,打开终端
LJS:~ JS$ sudo su
Password:
sh-3.2#>/usr/local/mysql-5.7.10-osx10.9-x86_64/bin/mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
sh-3.2#>/usr/local/mysql-5.7.10-osx10.9-x86_64/bin/mysql -u root mysql
mysql> select Host,User,authentication_string,password_expired from user;
+------------+--------------+--------------------------------------------------------------------------------+------------------------+
| Host | User | authentication_string | password_expired |
+------------+--------------+-------------------------------------------+--------------------------------------------------------------+
| localhost | root | *6691484EA6B50DDDE1926A220DA01FA9E575C18A | Y |
| localhost | mysql.sys | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | N |
+------------+--------------+--------------------------------------------------------------------------------+-------------------------+
mysql>update mysql.user set authentication_string = PASSWORD('12345678') where user = 'root';
mysql>update mysql.user set password_expired = 'N' where user = 'root';
mysql> flush privileges;
mysql> select Host,User,authentication_string,password_expired from user;
+------------+--------------+--------------------------------------------------------------------------------+------------------------+
| Host | User | authentication_string | password_expired |
+------------+--------------+-------------------------------------------+--------------------------------------------------------------+
| localhost | root |*84AAC12F54AB666ECFC2A83C676908C8BBC381B1 | N |
| localhost | mysql.sys | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | N |
+------------+--------------+--------------------------------------------------------------------------------+-------------------------+
mysql> quit
最后,重启一下电脑,就可以连接成功了!
- 238,安装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)
- linux安装MySQL出现ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- wampserver登陆mysql出现#1045 - Access denied for user 'root'@'localhost' (using password: YES) 问题
- Linux下连接Mysql出现:Access denied for user 'root'@'localhost' (using password:YES)的解决方法
- mysql 安装问题 access denied for user 'root'@'localhost' using password yes/no
- 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 API时出现如下问题的解决方法:Access denied for user 'root'@'localhost' (using password: YES)
- 解决MySQL #1045 - Access denied for user 'root'@'localhost' (using password: YES) 的问题
- linux 信号 中断的系统调用
- php设计模式:值对象模式
- C#中的foreach语句与枚举器接口(IEnumerator)及其泛型 相关问题
- ZOJ 1014 OPERAND
- IOS BezierPath 贝塞尔曲线画图详解
- 238,安装mysql出现Access denied for user 'root'@'localhost' (using password: YES)的问题
- ubuntu 的 document viewer evince 发生 Could not open X display 错误的处理
- Android 四大组件 —— 广播(广播机制解析)
- Interview Notes
- CAS单点登陆的原理
- poj2492 A Bug's Life(并查集)
- Hadoop—archive
- 反馈通道改善系统性能_20160130
- 1036. 跟奥巴马一起编程(15)