作者共發了7篇帖子。 內容轉換:不轉換▼
 
點擊 回復
579 6
我发现,Fedora22下安装的mysql-server,默认创建了test数据库
一派護法 十九級
1樓 發表于:2015-8-11 14:11
以前版本的linux都没有自动创建此数据库。
一派護法 十九級
2樓 發表于:2015-8-11 14:11
[octopus@pc5 ~]$ sudo service mariadb start
Redirecting 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)]>

一派護法 十九級
3樓 發表于:2015-8-11 14:12
MariaDB [(none)]> use test;
Database changed
MariaDB [test]> show tables;
Empty set (0.00 sec)

MariaDB [test]>

一派護法 十九級
4樓 發表于:2015-8-11 14:16
MariaDB [test]> SET PASSWORD FOR root@localhost = PASSWORD('newpas');
Query OK, 0 rows affected (0.00 sec)

MariaDB [test]>

一派護法 十九級
5樓 發表于:2015-8-11 14:17
MariaDB [test]> exit
Bye
[octopus@pc5 ~]$

一派護法 十九級
6樓 發表于:2015-8-11 14:17
[octopus@pc5 ~]$ mysql -u root
ERROR 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)]>

一派護法 十九級
7樓 發表于:2015-8-11 14:26
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)]>

回復帖子

內容:
用戶名: 您目前是匿名發表
驗證碼:
(快捷鍵:Ctrl+Enter)
 

本帖信息

點擊數:579 回複數:6
評論數: ?
作者:巨大八爪鱼
最後回復:巨大八爪鱼
最後回復時間:2015-8-11 14:26
 
©2010-2024 Arslanbar Ver2.0
除非另有聲明,本站採用創用CC姓名標示-相同方式分享 3.0 Unported許可協議進行許可。