创建用户:
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. UNIX环境编程学习笔记(17)——进程管理之进程的几个基本概念

    lienhua342014-10-05 1 main 函数是如何被调用的? 在编译 C 程序时,C 编译器调用链接器在生成的目标可执行程序文件中,设置一个特殊的启动例程为程序的起始地址.当内核执行 C ...

  2. 谁应该在CCB(变更控制委员会)中?

    In software development, a Change Control Board (CCB) or Software Change Control Board (SCCB) is a c ...

  3. opengl库区分:glut、freeglut、glfw、glew、gl3w、glad

    //oepngl库 opengl原生库 gl* 随opengl一起发布 opengl实用库 glu* 随opengl一起发布 opengl实用工具库glut glut* 需要下载配置安装(太老了!) ...

  4. liunx 时间ntp同步服务器

    1.root 用户下安装 yum install ntp -y 报错如下: 29 Apr 00:25:04 ntpdate[8786]: the NTP socket is in use, exiti ...

  5. Aspose------导入Excel

    代码: public List<T> ImportExcelToList<T>() { HttpContext context = HttpContext.Current; ) ...

  6. mysql存储引擎ARCHIVE

    mysql常用引擎MyISAM和InnoDB,前者插入快 查询快,后者修改快 支持事务,各有优缺点,在网上突然看到一个引擎叫ARCHIVE,还蛮特别的 这个引擎只允许插入和查询,不允许修改和删除.相当 ...

  7. PHP计算两个绝对路径的相对路径

    用PHP计算两个绝对路径的相对路径,该如何求呢? 先根据分隔符切割,然后查找相同 异同点,然后开始有相同点,从相同点结束为止开始拼接剩余部分,没有的话,到达根路径拼接整体. 截图如下: 代码如下: & ...

  8. 【GIS】Cesium1.49编译

    1.npm install 2.npm install --save-dev gulp 3.gulp default 4.npm run build 5.npm start 遇到问题 1.gulp不好 ...

  9. System.exit(0)会跳过finally块的执行

    public class test { public static void main(String[] args) { try { System.exit(0); System.out.printl ...

  10. 基于端口的弱口令检测工具--iscan

    亲手打造了一款弱口令检测工具,用Python编写,主要可以用于内网渗透.弱口令检测等方面,目前集成了常见端口服务,包含 系统弱口令:ftp.ssh.telnet.ipc$ 数据库弱口令:mssql.m ...