MySQL 出现 Access denied for user 'root&_MySQL
程序员文章站
2022-05-06 21:52:58
...
bitsCN.com
登录某台服务器的mysql时候总报错:
mysql2/client.rb:58:in `connect': Access denied for user 'root'@'localhost' (using password: YES) (Mysql2::Error)
解决方法:
在windows 下的解决方法也一样的
[sql] view plain copy
- # /etc/init.d/mysqld stop
- # mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
- # mysql -u root mysql
- mysql> UPDATE user SET Password= PASSWORD(’newpassword’) where USER=’root’;
- mysql> FLUSH PRIVILEGES;
- mysql> quit
- # /etc/init.d/mysqld restart
- # mysql -uroot -p
- Enter password:
- mysql>
上一篇: Java 实例 - 重载(overloading)方法中使用 Varargs
下一篇: 如果把 Java、PHP、C#、C、C++、Python 分别用一个人或一件东西来比喻,用什么来比喻比较恰当?
推荐阅读
-
解决mysql创建数据库后出现:Access denied for user 'root'@'%' to database 'xxx'的问题
-
windows 连接 linux 上的mysql出现Can't connect to; is not allowed to connect;Access denied for user
-
MySQL出现Access denied for user ‘root’@’localhost’ (using password:YES)
-
mysql出现ERROR1698(28000):Access denied for user root@localhost错误解决方法
-
解决error 1045: Access denied for user: 'root@lo_MySQL
-
MySQL 出现 Access denied for user 'root'@&am_MySQL
-
jdbc连接Mysql数据库出现Access denied for user 'root'@'localhost' (using password: YES) 拒绝访问问题解决
-
MySQL 出现 Access denied for user 'root'@&am_MySQL
-
解决mysql创建数据库后出现:Access denied for user 'root'@'%' to database 'xxx'的问题
-
MySQL 出现 Access denied for user 'root&_MySQL