2 回答

TA貢獻1993條經(jīng)驗 獲得超6個贊
1.查看數(shù)據(jù)庫,選中使用數(shù)據(jù)庫,并查看數(shù)據(jù)庫表,具體操作命令如下:
show databases;
use student;
show tables;
2.選擇student數(shù)據(jù)庫中的一張表stu_score,查看數(shù)據(jù)庫表數(shù)據(jù),并利用explain分析數(shù)據(jù)庫表,如下圖所示:
select * from stu_score;
explain select * from stu_score;
3.查看數(shù)據(jù)庫使用索引的情況,使用命令:
show status like 'Handler_read%';
4.用于分析和存儲表的關(guān)鍵字,分析的結(jié)果可以得到精準的信息,利用命令analyze,
analyze table stu_score;
5.檢查數(shù)據(jù)庫表stu_score,檢查表是否有錯誤,利用命令:
check table stu_score;
6.優(yōu)化數(shù)據(jù)庫表,利用命令:
optimize table stu_score;
擴展資料:
可以使用命令行工具管理 MySQL 數(shù)據(jù)庫(命令 mysql 和 mysqladmin),也可以從 MySQL 的網(wǎng)站下載圖形管理工具 MySQL Administrator, MySQL Query Browser 和 MySQL Workbench。
phpMyAdmin是由 php 寫成的 MySQ L資料庫系統(tǒng)管理程程序,讓管理者可用 Web 界面管理 MySQL 資料庫。
phpMyBackupPro也是由 PHP 寫成的,可以透過 Web 界面創(chuàng)建和管理數(shù)據(jù)庫。它可以創(chuàng)建偽 cronjobs,可以用來自動在某個時間或周期備份 MySQL 數(shù)據(jù)庫。
另外,還有其他的 GUI 管理工具,例如 mysql-front 以及 ems mysql manager, navicat等等。
添加回答
舉報