[root@www ~]# mysql -u root -p
Enter password: <==如前所述,你必須要輸入密碼嘛!
mysql> create database vbirddb; <==注意每個指令後面都要加上分號 (;)
Query OK, 1 row affected (0.01 sec)
mysql> grant all privileges on vbirddb.* to
identified by 'vbirdpw' ;
Query OK, 0 rows affected (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql | <==用來記錄 MySQL 帳號、主機等重要資訊的主要資料庫!
| test |
| vbirddb | <==我們剛剛建立的資料庫在此
+--------------------+
4 rows in set (0.00 sec)
mysql> use mysql;
mysql> select * from user where user = 'vbirduser';
# 上面兩個指令在查詢系統有沒有 vbirduser 這個帳號,若有出現一堆東西,
# 那就是查詢到該帳號了!這樣就建置妥當囉!
mysql> exit
阅读(1302) | 评论(0) | 转发(0) |