修改資料庫字元集:
[sql] ALTER DATABASE db_name DEFAULT CHARACTER SET character_name [COLLATE ...];
把表格預設的字元集和所有字元欄位(CHAR,VARCHAR,TEXT)改為新的字元集:
[sql] ALTER TABLE tbl_name CONVERT TO CHARACTER SET character_name [COLLATE ...] 如:ALTER TABLE logtest CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
只是修改表格的預設字元集:
www.2cto. com
[sql]
ALTER TABLE tbl_name DEFAULT CHARACTER SET character_name [COLLATE...]; 如:ALTER TABLE logtest DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
修改欄位的字元集:
[sql]
ALTER TABLE tbl_name CHANGE c_name c_name CHARACTER SET character_name [COLLATE ...]; 如:ALTER TABLE logtest CHANGE title title VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci;
<
[sql ]
SHOW CREATE DATABASE db_name;
檢視欄位編碼:
SHOW CREATE TABLE tbl_name;
3、mysqladmin shutdown
三、重啟
1、使用service 啟動:service mysqld restart
2、使用mysqld 腳本啟動:service mysqld restart
2、使用mysqld 腳本啟動:/startm/語句的內容,更多相關內容請關注PHP中文網(www.php.cn)!