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目录,输 ...
随机推荐
- Oracle11g温习-第十三章:索引
2013年4月27日 星期六 10:46 1.索引(Index)的功能:对记录进行排序,加快表的查询速度 2.索引的分类 1)B-tree 索引(默认) a.在一个大表上 b.建立在重复值比较少的 ...
- 19. Remove Nth Node From End of List C++删除链表的倒数第N个节点
https://leetcode.com/problems/remove-nth-node-from-end-of-list/ 使用双指针法,可以仅遍历一次完成节点的定位 /** * Definiti ...
- select2中的ajax请求
下面介绍select2.js的方法,已经整理好文件,可以直接下载使用: 实现效果如下: 引用文件:select2.min.css jquery.js select2.full.min.js <h ...
- vue 父组件通过props向子组件传递数据/方法的方式
参考网址:https://segmentfault.com/a/1190000010507616 下面栗子中, callback是传递父组件的方法, mutationName是传递父组件的数据, Ap ...
- c++ 软件版本比较函数
// 版本号拆分为数组 void splitToInt(string str , vector<int> *v1, char delim ){ // 拆分 string strTmp; s ...
- ci框架多语言切换
1.多语言切换首先配置config文件默认语言 2.创建自己的语言包:language chinese english目录下的语言包文件名必须以 xx_lang.php 可根据自己的需求创建数组: ...
- object遍历删除空值
export function deleteObjEmpty(search = {}) { for (let i in search) { search[i] == undef ...
- django+xadmin+echarts实现数据可视化
使用xadmin后功能比较强大,在后台展示统计图表,这个需求真的有点烫手,最终实现效果如下图: xadmin后台与echarts完全融合遇到以下问题: 1.没有现成的数据model 2.获得指定时间段 ...
- nginx:在linux上进行nginx的安装
-----1.安装 换源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 下载: wget ...
- TiDB 深度实践之旅--真实“踩坑”经历
美团点评 TiDB 深度实践之旅(9000 字长文 / 真实“踩坑”经历) 4 PingCAP · 154 天前 · 3956 次点击 这是一个创建于 154 天前的主题,其中的信息可能已经有所发 ...