Mysql – Command to create MySQL database with Character set UTF-8

charsetcommanddatabaseMySQLutf-8

I use create database dbname; to create database.
but I want it to created with Character set UTF-8

Anyone know what is the command to use?

Best Answer

Use the

CHARACTER SET

option when creating your database, like so:

CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_bin;

also, read the docs...