[root@master native]# mysql -uhive -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'hive'@'localhost' (using password: YES)
[root@master native]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select host,user from user;
+-----------+------+
| host      | user |
+-----------+------+
| %         | Hive |
| %         | root |
| 127.0.0.1 | root |
| localhost |      |
| localhost | root |
| master    |      |
| master    | root |
+-----------+------+
7 rows in set (0.00 sec)

mysql> delete from user where user=' ';
Query OK, 2 rows affected (0.00 sec)

mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql> select host,user from user;
+-----------+------+
| host      | user |
+-----------+------+
| %         | hive |
| %         | root |
| 127.0.0.1 | root |
| localhost | root |
| master    | root |
+-----------+------+
5 rows in set (0.00 sec)

mysql> delete from user where host='127.0.0.1';
Query OK, 1 row affected (0.00 sec)

mysql> delete from user where host='localhost';
Query OK, 1 row affected (0.00 sec)

mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql> select host,user from user;
+--------+------+
| host   | user |
+--------+------+
| %      | hive |
| %      | root |
| master | root |
+--------+------+
3 rows in set (0.00 sec)

mysql> exit
Bye
[root@master native]# mysql -uhive -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'hive'@'localhost' (using password: YES)
[root@master native]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> delete from user where user='hive';
Query OK, 1 row affected (0.00 sec)

mysql> commmit;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'commmit' at line 1
mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql> select host,user from user;
+--------+------+
| host   | user |
+--------+------+
| %      | root |
| master | root |
+--------+------+
2 rows in set (0.00 sec)

mysql> grant all privileges on hive.* to hive@"%" identified by "hive" with grant option;
Query OK, 0 rows affected (0.00 sec)

mysql> select host,user from user;
+--------+------+
| host   | user |
+--------+------+
| %      | hive |
| %      | root |
| master | root |
+--------+------+
3 rows in set (0.00 sec)

mysql> exit
Bye
[root@master native]# mysql -uhive -phive
ERROR 1045 (28000): Access denied for user 'hive'@'localhost' (using password: YES)
[root@master native]# mysql -uhive -phive -h master
ERROR 1045 (28000): Access denied for user 'hive'@'master' (using password: YES)
[root@master native]# mysql -uhive -h master -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'hive'@'master' (using password: YES)
[root@master native]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| hive               |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql> user hive
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user hive' at line 1
mysql> show tables;
ERROR 1046 (3D000): No database selected
mysql> use hive;
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> grant all privileges on hive.* to hive@"master" identified by "hive" with grant option;
Query OK, 0 rows affected (0.00 sec)

mysql> select host,user from user;
+--------+------+
| host   | user |
+--------+------+
| %      | hive |
| %      | root |
| master | hive |
| master | root |
+--------+------+
4 rows in set (0.00 sec)

mysql> exit
Bye
[root@master native]# mysql -uhive -h master -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show database;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database' at line 1
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| hive               |
| test               |
+--------------------+
3 rows in set (0.00 sec)

mysql> exit
Bye
[root@master native]# mysql -uhive -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'hive'@'localhost' (using password: YES)
[root@master native]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> grant all privileges on hive.* to hive@"localhost" identified by "hive" with grant option;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
[root@master native]# mysql -uhive -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| hive               |
| test               |
+--------------------+
3 rows in set (0.00 sec)

mysql> use hive;
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql>

ERROR 1045 (28000): Access denied for user 'hive'@'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. 一起来点React Native——常用组件之TextInput

    一.前言 文本输入框,相当于OC中的UITextField,在用法和属性方面,两者都有很大的借鉴之处:通过键盘将文本输入到应用程序的一个基本的组件: 二.TextInput的常见属性 因为TextIn ...

  2. C语言基础:常见循环语句 分类: iOS学习 c语言基础 2015-06-10 21:46 13人阅读 评论(0) 收藏

    for语句 for( 初始化表达式; 循环判断条件  ;增量表达式); while(条件表达式){ 循环体; } 先判断条件表达式,如果为真就执行循环体,执行完再去判断条件表达式 do{ 循环体; } ...

  3. TreeMap源码学习

    这是看过的第一个jdk源码(从立下目标以来):TreeMap.说实话断断续续的看了有好几天了,我觉得我犯了一个错误,就像一开始说的那样,我打算完完全全看懂TreeMap关于红黑树的实现方式,后来我想了 ...

  4. ajax请求成功回调函数没有执行问题

    如下常见的ajax前端请求,请求成功后success:function(result){ 这里的数据没有执行 }: $.ajax({ type:"post", url:" ...

  5. ElasticSearch(七):ElasticSearch集群的搭建

    由于资源有限,使用是一台机器上安装三个elasticSearch服务端组成的集群. 1. 安装elasticSearch6.3.2 将原本安装的elasticSearch6.3.2复制两份,分别重新命 ...

  6. .NET 编写一个可以异步等待循环中任何一个部分的 Awaiter

    林德熙 小伙伴希望保存一个文件,并且希望如果出错了也要不断地重试.然而我认为如果一直错误则应该对外抛出异常让调用者知道为什么会一直错误. 这似乎是一个矛盾的要求.然而最终我想到了一个办法:让重试一直进 ...

  7. .Net Core:部署应用

    实战Asp.Net Core:部署应用   1.前言 某一刻,你已经把 .Net Core 的程序写好了.接下来,还可以做什么呢?那就是部署了. 作为一名开发工程师,如果不会部署自己开发的应用,那么这 ...

  8. test20180921 量子纠缠

    题意 问题描述 万能的红太阳J 君正在研究量子信息的纠缠. 具体来说,J 君有一个初始为空的信息集.她会进行m 次操作,有时,她会向信息集内加入一个长度不超过L 的的数字串(一个数字串为一个仅由0 到 ...

  9. cacheAsBitmap位图缓存

    使用cacheAsBitmap将缓存显示对象的内部位图表示形式. 此缓存可以提高包含复杂矢量内容的显示对象的性能.此方法适合运用于较多的图片或文字移动,不过也不能太随意乱用,有利必有弊,使用cache ...

  10. js 坐标兼容性

    不同浏览器对坐标属性的支持: