Access denied for user 'root'@'IP' (using password:YES)解决方法
在MySql的使用过程中,碰到“Access denied for user 'root'@'IP' (using password:YES)”的问题,使用以下语句修改后还是不行。
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
1、开始 → 搜索栏里面输入cmd → 右键cmd.exe选择以管理员的身份运行
2、输入net stop mysql停止MySQL服务
3、输入命令行来到mysql的bin目录下,输入下列粗体命令
D:\MySQL\bin>mysqld --defaults-file="D:\MySQL\my.ini" --console --skip-grant-tables
等一下,显示出以下结果说明MySQL启动:
170215 22:26:09 [Warning] The syntax '--log' is deprecated and will be removed inMySQL 7.0. Please use '--general_log'/'--general_log_file' instead.
170215 22:26:09 [Warning] The syntax '--log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '--slow_query_log'/'-- slow_query_log_file' instead.
170215 22:26:09 [Warning] The syntax '--log' is deprecated and will be removed in MySQL 7.0. Please use '--general_log'/'--general_log_file' instead.
170215 22:26:09 [Warning] The syntax '--log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '--slow_query_log'/'--slow_query_log_file' instead.
170215 22:26:09 [ERROR] The update log is no longer supported by MySQL in version 5.0 and above. It is replaced by the binary log. Now starting MySQL with --log-bin='' instead.
170215 22:26:09 InnoDB: Started; log sequence number 0 324221
170215 22:26:09 [Note] mysqld: ready for connections.Version: '5.1.33-community-log' socket: '' port: 3306 MySQL Community Server (GPL)
4、再以管理员的身份打开一个cmd.exe,输入命令行来到mysql的bin目录下,输入:mysql -uroot mysql
5、进入mysql之后,输入命令行修改密码:
mysql>update user set authentication_string=password('123456') where user='root';
6、刷新权限:mysql>flush privileges;
7、退出mysql:mysql> quit;
Access denied for user 'root'@'IP' (using password:YES)解决方法的更多相关文章
- Access denied for user 'root'@'localhost' (using password:YES)解决方法
Access denied for user 'root'@'localhost' (using password:YES)解决方法 在MySQL的使用过程中,我们可能会碰到“Access denie ...
- MySQL------报错Access denied for user 'root'@'localhost' (using password:NO)解决方法
报错:Access denied for user 'root'@'localhost' (using password:NO) 原因:没有给用户“root'@'localhost”赋予数据库权限 解 ...
- linux下mysql出现Access denied for user 'root'@'localhost' (using password: YES)解决方法
# /etc/init.d/mysql stop # mysqld_safe --user=mysql --skip-grant-tables --skip-networking & # my ...
- 转载--MYSQL5.7:Access denied for user 'root'@'localhost' (using password:YES)解决方法
1.打开MySQL目录下的my.ini文件,在文件的最后添加一行"skip-grant-tables",保存并关闭文件; 2.重启MySQL服务; 3.通过cmd行进入MySQL的 ...
- ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO)解决办法
问题:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 很久没用这台电脑的mysql ...
- 2003 -Can't connection to mysql server on | navicat for mysql Access denied for user 'root'@''ip'(using password :yes)
用本机windows上的Navicat for mysql链接虚拟机Linux的mysql数据库时,第一次连接的时候报的错误是 2003 -Can't connection to mysql serv ...
- mac 安装mysql + 修改root用户密码 + 及报Access denied for user 'root'@'localhost' (using password:YES)解决办法
1.下载MySQL 到mysql的官网http://dev.mysql.com/downloads/mysql/然后在页面中会看到“MySQL Community Server”下方有一个“downl ...
- java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) 解决办法
一.背景 在Spark中,将DStream写入到MySQL出现错误:java.sql.SQLException: Access denied for user 'root'@'localhost' ( ...
- 连接mysql报错Access denied for user 'root'@'localhost' (using password: YES)解决办法
1.打开MySQL目录下的my.ini文件,在文件的最后添加一行“skip-grant-tables”(免密码登录),保存并关闭文件,重启MySQL服务. 2.通过命令行进入MySQL的BIN目录,输 ...
随机推荐
- python-day79--知识回顾
内容回顾: 1. 可迭代对象.迭代器.生成器是什么?什么区别? 可迭代对象,含有__iter__,返回一个迭代器 迭代器,含有__iter__,__next__方法 生成器,yield,__next_ ...
- leetcode-algorithms-6 ZigZag Conversion
leetcode-algorithms-6 ZigZag Conversion The string "PAYPALISHIRING" is written in a zigzag ...
- Hive QL的操作
一.数据定义DDL操作 创建表: --create table为创建一个指定名字的表 create(external) table table_name --external关键字可以让用户创建一个外 ...
- nginx配置location总结及rewrite规则写法(2)
2. Rewrite规则 rewrite功能就是,使用nginx提供的全局变量或自己设置的变量,结合正则表达式和标志位实现url重写以及重定向.rewrite只能放在server{},location ...
- .net mvc 列名 'Discriminator' 无效
环境:asp.net 4.0 + MVC 4 + Entity Framework 5异常:使用code first 碰到错误:列名 'Discriminator' 无效.这是一个很少见的错误,搜索了 ...
- 读取图片列表——CNN输入
image_list = [] new_file_list = [] for root, _, file_list in os.walk(predict_dir): new_file_list += ...
- python(5)之集合
集合是一个无序的,不重复的数据组合,它的主要作用如下: 1.去重,把一个列表变为集合就自动去重了 2.关系测试,测试两组数据之间的交集.并集.差集等 常用操作如下: #集合的操作 list_1={1, ...
- Zookeeper面试题
Zookeeper是什么框架 分布式的.开源的分布式应用程序协调服务,原本是Hadoop.HBase的一个重要组件.它为分布式应用提供一致性服务的软件,包括:配置维护.域名服务.分布式同步.组服务等. ...
- 修改Host,配置域名访问
修改Host,配置域名访问 虽然我们已经能够通过localhost访问本地网站了,为了提高逼格,我们可以修改host文件,设置一个自己喜欢的域名指向本地网站,岂不是更高大上. 明确需求 通过配置, ...
- java局部变量,成员变量在堆和栈中的存储
对于局部变量,如果是基本类型,会把值直接存储在栈:如果是引用类型,比如String s = new String("william");会把其对象存储在堆,而把这个对象的引用(指针 ...