创建用户:
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. 用grep 筛选fastq 序列

    grep 从文件中筛选出 包含指定的字符或者正则表达式的行:默认只打印匹配到的行, 比如一个文件 test.txt, 其内容为: abc def ghi jkl grep a test.txt, 输出 ...

  2. c#中//注释和///注释的区别 智能注释 显示换行

    ///会被编译,//不会所以使用///会减慢编译的速度(但不会影响执行速度)///会在其它的人调用你的代码时提供智能感知 也是一种注释,但是这种注释主要有两种作用:1.这些注释能够生成一个XML文件. ...

  3. [mysql-Ver5.6.23] windows版my.ini配置

    基于utf8mb4比utf8多了种编码,能更好的支持emoji表情(http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.htm ...

  4. 无向带权图的最小生成树算法——Prim及Kruskal算法思路

    边赋以权值的图称为网或带权图,带权图的生成树也是带权的,生成树T各边的权值总和称为该树的权. 最小生成树(MST):权值最小的生成树. 生成树和最小生成树的应用:要连通n个城市需要n-1条边线路.可以 ...

  5. linux中iptables的用法

    iptables基本操作笔记 一.基本操作 #启动防火墙 service iptables start #停止防火墙 service iptables stop #重启防火墙 service ipta ...

  6. Yii2 cache的用法(1)

    数据缓存需要缓存组件提供支持,它代表各种缓存存储器, 例如内存,文件,数据库. 'components' => [ 'cache' => [ 'class' => 'yii\cach ...

  7. java使用javax.mail进行免费的邮件发送

    1. 建议发送方使用阿里云邮箱https://mail.aliyun.com/,阿里云默认是开启个人邮箱pop3.smtp协议的,所以无需在阿里云邮箱里设置,pop3.smtp的密码默认邮箱登录密码, ...

  8. Oracle 一个中文汉字 占用几个字节,由Oracle中字符集编码决定

    Oracle 一个中文汉字 占用几个字节,要根据Oracle中字符集编码决定 查看oracle server端字符集 select userenv('language') from dual; 如果显 ...

  9. wine for MacOS

    Installing Wine on Mac This tutorial is for intermediate users who want to install and use Wine on t ...

  10. SVN中图标符号的含义

    黄色感叹号(有冲突): 这是有冲突了,冲突就是说你对某个文件进行了修改,别人也对这个文件进行了修改,别人抢在你提交之前先提交了,这时你再提交就会被提示发生冲突,而不允许你提交,防止你的提交覆盖了别人的 ...