Possible Duplicate:
How to make MySQL handle UTF-8 properly
- I already created my database.
I don't want to do this in my.cfg.
I want to run an SQL query to set utf-8 as my default on this database.
Possible Duplicate:
How to make MySQL handle UTF-8 properly
I don't want to do this in my.cfg.
I want to run an SQL query to set utf-8 as my default on this database.
Once you start creating tables, it is no longer a single ALTER DATABASE statement. You need:
ALTER TABLE `foo`.`bar` CHARACTER SET utf8 COLLATION utf8_general_ci
as already hinted in the comment. This changes the collation of all columns in the table to the specified one. However, it is also possible to control character set and collation also on column by column basis if desired.