MySQL是一種開放源代碼的關(guān)系型數(shù)據(jù)庫管理系統(tǒng),被廣泛應(yīng)用于Web應(yīng)用程序的開發(fā)中。對于一般的MySQL用戶來說,他們可以做以下幾件事情:
1. 創(chuàng)建和管理數(shù)據(jù)庫 CREATE DATABASE databasename; 2. 創(chuàng)建和管理數(shù)據(jù)表 CREATE TABLE tablename ( column1 datatype, column2 datatype, column3 datatype, .... ); 3. 插入、更新和刪除數(shù)據(jù) INSERT INTO tablename (column1, column2, column3, ...) VALUES (value1, value2, value3, ...); UPDATE tablename SET column1=value1, column2=value2, ... WHERE condition; DELETE FROM tablename WHERE condition; 4. 查詢數(shù)據(jù) SELECT column1, column2, ... FROM tablename WHERE condition; 5. 管理用戶權(quán)限 GRANT privilege ON databasename.tablename TO 'username'@'localhost'; 6. 導(dǎo)入、導(dǎo)出數(shù)據(jù) 導(dǎo)出:mysqldump -u username -p databasename >filename.sql 導(dǎo)入:mysql -u username -p databasename< filename.sql 7. 運行MySQL命令行 mysql -u username -p