How to find the MySQL collation and character set?

To find the collation of a database

mysql> SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = ‘exampledb’ LIMIT 1;

+————————+
| DEFAULT_COLLATION_NAME |
+————————+
| utf8_general_ci |
+————————+

 

To find the characterset of a MySQL database

mysql> SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = “exampledb”;

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Written by kurinchilamp


Website: http://

Leave a Reply

Your email address will not be published. Required fields are marked *

Kurinchi Calendar
January 2014
M T W T F S S
« Dec   Feb »
 12345
6789101112
13141516171819
20212223242526
2728293031  
Read previous post:
Sudo, Visudo -bash: visudo: command not found

Visudo is needed to make modifications to the sudoers file. In a fresh install of CentOS "sudoers" file is not...

Close