标签:
1. System information:
[root@mgt MgmtStatus]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)
[root@mgt MgmtStatus]# uname -a
Linux mgt 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@mgt MgmtStatus]# rpm -qa | grep mariadb
mariadb-server-5.5.44-2.el7.x86_64
mariadb-5.5.44-2.el7.x86_64
mariadb-libs-5.5.44-2.el7.x86_64
[root@mgt MgmtStatus]#
[root@Rack_TestData ~]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 60
Server version: 5.5.41-MariaDB MariaDB Server
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
MariaDB [(none)]>
MariaDB [(none)]> show grants;
+---------------------------------------------------------------------+
| Grants for root@localhost |
+---------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘localhost‘ WITH GRANT OPTION |
| GRANT PROXY ON ‘‘@‘‘ TO ‘root‘@‘localhost‘ WITH GRANT OPTION |
+---------------------------------------------------------------------+
2 rows in set (0.01 sec)
MariaDB [(none)]>
MariaDB [(none)]> 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
MariaDB [mysql]> select user,host,password from user where user=‘‘;
+------+----------------+----------+
| user | host | password |
+------+----------------+----------+
| | localhost | |
| | rack\_testdata | |
+------+----------------+----------+
2 rows in set (0.00 sec)
MariaDB [mysql]>
[root@mgt MgmtStatus]# mysql
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO)
[root@mgt MgmtStatus]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO)
[root@mgt MgmtStatus]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 26
Server version: 5.5.44-MariaDB MariaDB Server
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
MariaDB [(none)]> 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
MariaDB [mysql]> select user,host,password from user where user=‘‘;
Empty set (0.01 sec)
MariaDB [mysql]> select user,host,password from user;
+----------------+-----------+-------------------------------------------+
| user | host | password |
+----------------+-----------+-------------------------------------------+
| root | localhost | *8DB8413E28D4DB2FF73A45BACED76C20FE607F41 |
| root | mgt | *8DB8413E28D4DB2FF73A45BACED76C20FE607F41 |
| root | 127.0.0.1 | *8DB8413E28D4DB2FF73A45BACED76C20FE607F41 |
| root | ::1 | *8DB8413E28D4DB2FF73A45BACED76C20FE607F41 |
| computenodedba | % | *920F6DF0856242E405A8059E19930A80912A00FC |
+----------------+-----------+-------------------------------------------+
5 rows in set (0.00 sec)
MariaDB [mysql]>
2016/7/20 12:17:54 MariaDB 默认情况下,无法验证密码
标签:
原文地址:http://www.cnblogs.com/topshooter/p/0769342dc3ab5af94683cb1570588321.html