在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)解决方法的更多相关文章

  1. Access denied for user 'root'@'localhost' (using password:YES)解决方法

    Access denied for user 'root'@'localhost' (using password:YES)解决方法 在MySQL的使用过程中,我们可能会碰到“Access denie ...

  2. MySQL------报错Access denied for user 'root'@'localhost' (using password:NO)解决方法

    报错:Access denied for user 'root'@'localhost' (using password:NO) 原因:没有给用户“root'@'localhost”赋予数据库权限 解 ...

  3. 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 ...

  4. 转载--MYSQL5.7:Access denied for user 'root'@'localhost' (using password:YES)解决方法

    1.打开MySQL目录下的my.ini文件,在文件的最后添加一行"skip-grant-tables",保存并关闭文件; 2.重启MySQL服务; 3.通过cmd行进入MySQL的 ...

  5. 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 ...

  6. 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 ...

  7. 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 ...

  8. java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) 解决办法

    一.背景 在Spark中,将DStream写入到MySQL出现错误:java.sql.SQLException: Access denied for user 'root'@'localhost' ( ...

  9. 连接mysql报错Access denied for user 'root'@'localhost' (using password: YES)解决办法

    1.打开MySQL目录下的my.ini文件,在文件的最后添加一行“skip-grant-tables”(免密码登录),保存并关闭文件,重启MySQL服务. 2.通过命令行进入MySQL的BIN目录,输 ...

随机推荐

  1. 5月16 JSON的一些知识点及AJAX的应用

    什么是JSON? JSON(JavaScript Object Notation)是一种轻量级的数据交换语言,以文字为基础,(文本数据交换格式).JSON简单说就是javascript中的对象和数组, ...

  2. input type="number" 时 maxlength不起作用

    给input标签添加 oninput=“if(value.length>11) value=value.slice(0,11)”

  3. HTTP及RFC解析。

    HTTP协议描述的是发送方与接收方的通信协议,通过两方的自觉遵守而存在,当然有不少的浏览器并没有百分百遵守这份协议.HTTP是运行于应用层的协议,基于TCP协议而运作.基本上是客户/服务器对答模式,其 ...

  4. ECharts 报表事件联动系列四:柱状图,折线图,饼状图实现联动

    代码如下: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" c ...

  5. 创建型模式篇(单例模式Single Pattern)

    一.单例模式(Singleton Pattern) 单例模式要求一个类只能有一个实例,并且提供了一个全局的访问点. 比如说,中国主席的职位是Singleton,法律规定主席选举,任何时间只能有一个主席 ...

  6. ubuntu分辨率

    http://askubuntu.com/questions/235507/xconfig-xrandr-badmatch 先装驱动再说. 今天开机发现ubuntu分辨率不正常只有1024×768, ...

  7. Uva 10635 - Prince and Princess 问题转化,元素互不相同(在自身序列中独特)的两个数列的LCS,LIS 难度: 2

    题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&a ...

  8. Uva LA 3177 - Beijing Guards 贪心,特例分析,判断器+二分,记录区间内状态数目来染色 难度: 3

    题目 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_pr ...

  9. bzoj1666

    题解: 简单模拟 按照题目意思来就可以了 代码: #include<bits/stdc++.h> using namespace std; int n,ans; int main() { ...

  10. Python Django 之 直接执行自定义SQL语句(一)

    一.执行自定义SQL方法 1.Executing custom SQL directly      直接执行自定义SQL,这种方式可以完全避免数据模型,而是直接执行原始的SQL语句. 2.Manage ...