mysql_异常_01_Access denied for user 'root'@'192.168.1.13' (using password: YES)
一、异常现象
使用navicat premuim 连接 虚拟机mysql数据库时 ,抛出如下错误:
Access denied for user 'root'@'192.168.1.13' (using password: YES)
二、异常原因
Mysql 安装完毕后,默认会有'root'@'localhost'
用户,这个用户只能在本机登录mysql。若需要远程登录,则需要以'root'@'%'
用户登录。
出现上图,是因为当前数据库中没有 'root'@'%'用户,或是此用户密码不对,因此需要创建这个用户或修改此用户密码
三、异常解决
在 mysql 服务器上使用root进行登录:
mysql -u root -p
然后执行如下命令:
(1) 创建用户并授权
# 创建 'root'@'%'用户
CREATE USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root'; # 授权
grant all on *.* to 'root'@'%';
flush privileges;
(2)或者修改密码
alter user 'root'@'%' identified by 'root.';
然后再连接即可成功连接。
二、参考资料
1.解决mysql"Access denied for user'root'@'IP地址'"问题
2.关于远程访问mysql出现Access denied for user 'root'@'的解决方法
mysql_异常_01_Access denied for user 'root'@'192.168.1.13' (using password: YES)的更多相关文章
- python连接mariadb报错解决1045, "Access denied for user 'root'@'192.168.0.50' (using password: YES)
[root@localhost ~]# python Python 2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Ha ...
- idea启动报错:Access denied for user 'root '@'192.168.100.XXX' (using password: YES)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean wit ...
- 解决MySql Access denied for user 'root'@'192.168.1.119' to databse 的问题
因为ip未授权,在navicat中执行 grant all privileges on *.* to 'root'@'192.168.1.119' identified by 'root' with ...
- Access denied for user '密码'@'192.18.0.0' (using password: YES)
Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.6:generate (default- ...
- ligh@local-host$ ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.0.3
ligh@local-host$ ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.0.3
- (28000): Access denied for user 'root'@'127.0.0.1' (using password: YES)
在一台测试服务器测试Python脚本时,执行Python脚本时报如下错误: 主要错误信息为"operation the sql fail!1045 (28000): Access den ...
- ssh免密登陆:sshpass -p [passwd] ssh -p [port] root@192.168.X.X
正文: ssh免密登陆:sshpass -p [passwd] ssh -p [port] root@192.168.X.X
- ERROR 1045 (28000): Access denied for user 'root'@'127.0.0.1' (using password: YES)
我的原因是在配置文件my.ini [mysqld]项,在其后加入了一句:skip-name-resolve 导致授权出现这个错误,把skip-name-resolve这项屏蔽了就好了. 场景2:对所有 ...
- mysql错误 Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES)
mysql -u root -p Aaa111222333 grant all privileges on *.* to root@'%' identified by 'aaa111222333; Q ...
随机推荐
- 20170411 F110初始界面-建议清单
功能块代码 F110 开发类 FIBP 事务说明 自动付款参数 程序 SAPF ...
- Oracle11g用户频繁锁定并且解锁后不允许登录
原因有可能是oracle的密码过期机制导致的:一.由于Oracle中默认在default概要文件中设置了“PASSWORD_LIFE_TIME=180天”所导致.解决办法:1.查看用户用的哪种prof ...
- windows下python调用c文件流程
1.新建fun.c文件和fun.h文件 #include <stdio.h> #include <stdlib.h> #include <string.h> int ...
- 剑指offer 面试26题
面试26题: 题目:树的子结构 题:输入两棵二叉树A和B,判断B是不是A的子结构. 解题思路:递归,注意空指针的情况. 解题代码: # -*- coding:utf-8 -*- # class Tre ...
- net mvc 利用NPOI导入导出excel
1.导出Excel : 首先引用NPOI包(Action一定要用FileResult) /// <summary> /// 批量导出需要导出的列表 /// </summary> ...
- JavaScript Date to c# Ticks
var ticks =((yourDateObject.getTime()*10000)+621355968000000000); var minDate = new Date("2013& ...
- Serv-u 外网访问内网的FTP服务器
1. 背景简介 最近研究如何在内网搭架FTP服务器,同时要保证外网(公网)能访问的到.终成正果,但走了一些弯路,在此记下,以飨后人. 2. 基础知识 FTP 使用 2 个端口,一个数据端口和一个命令端 ...
- docker多个容器连接 将 Rails 程序部署到 Docker 容器中
在docker中使用MySQL数据库 https://yq.aliyun.com/articles/583765 将 Rails 程序部署到 Docker 容器中
- SOA和微服务之间的区别
近几年,我们有很多文章对SOA和微服务之间的不同点和相似点进行了分析.有些人认为SOA有很多地方是值得微服务学习的,而有些人则认为区别对待微服务和SOA会更好.而Neal Ford认为,将单体迁移到面 ...
- imx6qsbd kpp
转: https://blog.csdn.net/zyaiwmy/article/details/54313025 https://www.aliyun.com/jiaocheng/123973.ht ...