Tuesday, October 30, 2012

MySQL DEFAULT CHARACTER SET utf8 change

ALTER DATABASE `db_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci 
 
CREATE TABLE `test`.`table1` (
`content` VARCHAR( 2000 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci; 
ALTER TABLE table_name CONVERT TO CHARACTER SET 'utf8';  

No comments: