创建用户:
mysql> grant all on db1.* to mycat@'%' identified by '123456';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privlege; 查看:
mysql> select user,host from mysql.user;
+-------+-------------+
| user | host |
+-------+-------------+
| mycat | % |
| root | 127.0.0.1 |
| repl | 192.168.2.% |
| root | ::1 |
| | localhost |
| root | localhost |
| | mysql01 |
| root | mysql01 |
+-------+-------------+
8 rows in set (0.00 sec) 测试
[mysql@mysql01 ~]$ mysql -umycat -p123456 -h 127.0.0.1 -P3316
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'mycat'@'localhost' (using password: YES) 解决方案:
[mysql@mysql01 ~]$ mysql -u root -p123456 -h 127.0.0.1 -P3316
mysql> use mysql
mysql> delete from user where user='';
mysql> flush privileges; 测试登陆成功
[mysql@mysql01 ~]$ mysql -umycat -p123456 -h 127.0.0.1 -P3316
mysql>

ERROR 1045 (28000): Access denied for user 'mycat'@'localhost' (using password: YES)的更多相关文章

  1. Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    案例环境: 操作系统 :Red Hat Enterprise Linux Server release 5.7 (Tikanga) 64 bit 数据库版本 : Mysql 5.6.19 64 bit ...

  2. MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的真正原因

    在博客Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N ...

  3. 升级到macOS 10.12 mysqlb报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    系统升级到macOS 10.12后启动mysql后,在终端输入mysql 报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' ...

  4. mysql 链接失败(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES))

    mysql链接失败(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)) 修改: # ...

  5. 安装mysql因为/tmp权限不足而导致ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)的解决方案

    本机是centos 6.5  安装的mysql是5.1的版本. 在安装mysql之后,第一次启动mysql服务的时候,需要/tmp有777(rwxrwxrwx)的权限,然而楼主的/tmp是755(rw ...

  6. MySQL5.5出面ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)问题的解决办法

    问题描述 安装完MySQL5.5数据库,使用Navicat Premium以及命令窗口连接数据库都报以下错误: ERROR 1045 (28000): Access denied for user ' ...

  7. 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) Enter password: E ...

  8. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) ERROR 2013 (HY00 ...

  9. ERROR 1045 (28000): Access denied for user root@localhost (using password:

    错误描述: Mysql中添加用户之后可能出现登录时提示ERROR 1045 (28000): Access denied for user的错误.删除user.user中值为NULL的,或更新NULL ...

随机推荐

  1. C# byte[]保存成文件

    string path = Server.MapPath(@"\a.pdf"); FileStream fs = new FileStream(path, FileMode.Cre ...

  2. Yii2 session的使用方法(1)

    yii2打开session use yii\web\Session; $session = Yii::$app->session; // check if a session is alread ...

  3. 机器学习——利用PCA来简化数据

    降维技术的好处: 1.使得数据集更易使用 2.降低很多算法的计算开销 3.取出噪声 4.使得结果易懂 在已标注和未标注的数据上都有降维技术,降维的方法: 1.主成分分析(Principal Compo ...

  4. js简单Base64编码解码

    var str = 'javascript'; window.btoa(str) //转码结果 "amF2YXNjcmlwdA==" window.atob("amF2Y ...

  5. VBscript实现开机自动启动,自动复制原件后启动

    set fso = createobject("scripting.filesystemobject") set ws = createobject("wscript.s ...

  6. MongoDB数据直接转移

    本方法较为暴力,有待验证,重要资料切勿使用.... 1.把一台电脑上MongoDB的--dbpath 下的文件夹  直接复制过来,放在新设备上 2.写个可爱的批处理文件 其实,就是改了个--dbpat ...

  7. idea中mybatis generator自动生成代码配置 数据库是sqlserver

    好长时间没有写博客了,最近公司要用java语言,开始学习java,属于初学者,今天主要记录一下mybatis generator自动生成代码,首先在如下图的目录中新建两个文件,如下图 generato ...

  8. Synycovery 7.18f 一个优秀的同步软件

    Serial Key Name: Vdown RG Code: MCKOFA7MNGUQY7954

  9. c#系统消息类封装

    今天封装了一个返回json的消息类 using System; using System.Collections.Generic; using System.Linq; using System.Te ...

  10. iphone弹出窗口效果的制作(Core animation, CALayer)

    效果类似人人网微薄客户端的弹出效果 static CGFloat kTransitionDuration = 0.3; - (void)initView { UIWindow *window = [U ...