獲取 數據庫 和 表信息:
mysql> connect; mysql> show databases; mysql> show tables; mysql> show tables from db_name; mysql> show columns from tbl_name; mysql> show index from tbl_name; mysql> show table status; mysql> show table status from db_name; mysql> show create database db_name; mysql> show create table tbl_name; shell> bin/mysqlshow -uroot -pmeiyoumima shell> bin/mysqlshow db_name -uroot -pmeiyoumima shell> bin/mysqlshow db_name tbl_name -uroot -pmeiyoumima shell> bin/mysqlshow --keys db_name tbl_name -uroot -pmeiyoumima shell> bin/mysqlshow --status db_name shell> bin/mysqldump --no-data db_name tbl_name -uroot -pmeiyoumima
確定MySQL支持哪些表類型:
mysql> show variables like '%have%';
直接得到表類型清單:
mysql> show table types;