1.啟動mysql服務: net start mysql

2.登錄mysql資料庫: mysql -u root -p 按確認鍵后輸入密碼,若無密碼直接按空格即可

3.查詢有多少個資料庫: show databases;

4.使用某個資料庫: use 資料庫名;

5.查詢當前資料庫下的所有表: show tables;

6.查看某個表的結構: desc 表名;

7.查看當前使用的資料庫: select database();

8.退出資料庫: exit;

9.關閉mysql服務: net stop mysql

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/227346.html
標籤:MySQL
