命令行工具從零開始(2)
1.查看mysql中的數(shù)據(jù)庫=====SHOW DATABASES;
2.創(chuàng)建一個數(shù)據(jù)庫=========CREATE DATABASE database-name;
3.創(chuàng)建數(shù)據(jù)庫時確定編碼規(guī)則=====CREATE DATABASE database-name CHARACTER SET name;
4.查看創(chuàng)建數(shù)據(jù)庫時候的編碼規(guī)則====SHOW CREATE DATABASE database-name;
5.切換數(shù)據(jù)庫的編碼規(guī)則====ALTER DATABASE database-name CHARCTER SET name;
6.刪除數(shù)據(jù)庫========DROP DATABASE database-name;
7.使用那個數(shù)據(jù)庫 ====USE database-name;
8.查看當(dāng)前打開的數(shù)據(jù)庫=====SELECT DATABASE();