mysql 05day

mysql的基本命令

mysql -u root -p;登錄
show databases; 查看數(shù)據(jù)庫目錄
show databases like 'db_%';
create database test character set=utf8;創(chuàng)建一個test數(shù)據(jù)庫
create schema test character set=utf8;
create database test charset utf8;
create database if not exists test;如果不存在test數(shù)據(jù)庫就創(chuàng)建一個
alter database test charset utf8;修改test數(shù)據(jù)庫的字符集
alter database test character set=utf8;
drop database test;刪除一個test數(shù)據(jù)庫
drop database if not exists test;如果存在刪除,不存在就忽略
use database test;進(jìn)入或選擇一個test的數(shù)據(jù)庫
help XXX;查看一個命令的詳細(xì)情況
show create database test;查看test數(shù)據(jù)庫
show engines \G;顯示存儲引擎的狀態(tài)信息
show engines;
show engines like 'default%'; 顯示存儲引擎默認(rèn)的狀態(tài)信息
show variables; 查看系統(tǒng)變量及其值;
show variables \G;
show variables like 'default_storage_engine';查看默認(rèn)數(shù)據(jù)庫引擎
show variables like 'default%';
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容