mysql> create database andrew
-> default character set utf8;
Query OK, 1 row affected (0.00 sec)
mysql> show create database andrew;
+----------+-----------------------------------------------------------------+
| Database | Create Database |
+----------+-----------------------------------------------------------------+
| andrew | CREATE DATABASE `andrew` /*!40100 DEFAULT CHARACTER SET utf8 */ |
+----------+-----------------------------------------------------------------+
1 row in set (0.00 sec)
mysql>
... and you can alter it subsequently as follows:
mysql> alter database andrew charset = latin1;
Query OK, 1 row affected (0.00 sec)
mysql> show create database andrew;
+----------+-------------------------------------------------------------------+
| Database | Create Database |
+----------+-------------------------------------------------------------------+
| andrew | CREATE DATABASE `andrew` /*!40100 DEFAULT CHARACTER SET latin1 */ |
+----------+-------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql>
No comments:
Post a Comment