在命令提示字元執行MySQL

 mysql 的指令都要有;結尾

登入mysql

mysql -u root -p




查詢有哪些資料庫,注意要有;且不能空白

mysql> show databases;


進入資料庫

mysql> show databases;


顯示資料庫有哪些資料表

mysql> show tables;


顯示資料表的Scheme碼

mysql> describe table;


顯示資料表前10筆資料

mysql>select * from table limit 10; 



參考:
  • https://www.sqlsplus.com/how-to-list-all-databases-in-mysql/
  • http://g2pc1.bu.edu/~qzpeng/manual/MySQL%20Commands.htm

留言