一、連接MySQL,輸入命令:mysql -u root –p,再輸入密碼,登陸成功後會顯示:Welcome to the MySQL monitor。。。。。如下圖:
二、創建數據庫,輸入sql命令: create database OASystem default character set utf8;(指定編碼爲utf8 數據庫中utf8中間沒有—)
三、查看創建的數據庫: show create database OASystem;
四、使用status指令語句來查看MySQL服務器的狀態信息。
狀態信息包括:
1 | Connection id | 當前鏈接的id號 |
2 | Current database | 當前選擇的使用的數據庫 |
3 | Current user | 當前鏈接的登錄用戶 |
4 | SSL | 是否使用ssl |
5 | Using delimiter | 行終結符是否使用 |
6 | Server version | 當前mysql服務器的版本號 |
7 | Protocol version | 協議版本 |
8 | Connection | 使用的鏈接類型 |
9 | Server characterset | 服務器使用的字符類型 |
10 | Db characterset | 數據庫使用的字符類型 |
11 | Client characterset | 客戶端使用的字符類型 |
12 | Conn. characterset | 鏈接使用的字符類型 |
13 | TCP port | 鏈接端口號 |
14 | Binary data as | 二進制數據表示 |
15 | Uptime | 運行時間 |