|  | 我發現,Fedora22下安裝的mysql-server,默認創建了test數據庫 | 
                
          |   一派掌门 二十级 | 
              以前版本的linux都沒有自動創建此數據庫。             | 
                
          |   一派掌门 二十级 | 
              [octopus@pc5 ~]$ sudo service mariadb startRedirecting to /bin/systemctl start  mariadb.service
 [octopus@pc5 ~]$ mysql -u root -p
 Enter password:
 Welcome to the MariaDB monitor.  Commands end with ; or \g.
 Your MariaDB connection id is 3
 Server version: 10.0.20-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)]> show databases;
 +--------------------+
 | Database           |
 +--------------------+
 | information_schema |
 | mysql              |
 | performance_schema |
 | test               |
 +--------------------+
 4 rows in set (0.00 sec)
 
 MariaDB [(none)]>
 
 
 | 
|
        
                
          |   一派掌门 二十级 | 
              MariaDB [(none)]> use test;Database changed
 MariaDB [test]> show tables;
 Empty set (0.00 sec)
 
 MariaDB [test]>
 
 
 | 
|
        
                
          |   一派掌门 二十级 | 
              MariaDB [test]> SET PASSWORD FOR root@localhost = PASSWORD('newpas');Query OK, 0 rows affected (0.00 sec)
 
 MariaDB [test]>
 
 
 | 
|
        
                
          |   一派掌门 二十级 | 
              MariaDB [test]> exitBye
 [octopus@pc5 ~]$
 
 
 | 
|
        
                
          |   一派掌门 二十级 | 
              [octopus@pc5 ~]$ mysql -u rootERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
 [octopus@pc5 ~]$ mysql -u root -p
 Enter password:
 Welcome to the MariaDB monitor.  Commands end with ; or \g.
 Your MariaDB connection id is 5
 Server version: 10.0.20-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)]>
 
 
 | 
|
        
                
          |   一派掌门 二十级 | 
              MariaDB [(none)]> select PASSWORD('abc');+-------------------------------------------+
 | PASSWORD('abc')                           |
 +-------------------------------------------+
 | *0D3CED9BEC10A777AEC23CCC353A8C08A633045E |
 +-------------------------------------------+
 1 row in set (0.00 sec)
 
 MariaDB [(none)]> select MD5('abc');
 +----------------------------------+
 | MD5('abc')                       |
 +----------------------------------+
 | 900150983cd24fb0d6963f7d28e17f72 |
 +----------------------------------+
 1 row in set (0.00 sec)
 
 MariaDB [(none)]>
 
 
 | 
|