How can we check the default character sets of all the MySQL databases we have on the server?


The query below will return the name of the database along with the default character set −

mysql> SELECT SCHEMA_NAME 'Database', default_character_set_name 'charset' FROM information_schema.SCHEMATA;
+--------------------+---------+
| Database           | Charset |
+--------------------+---------+
| information_schema | utf8    |
| gaurav             | latin1  |
| menagerie          | latin1  |
| mysql              | latin1  |
| performance_schema | utf8    |
| sample             | latin1  |
| test               | latin1  |
| tutorial           | latin1  |
+--------------------+---------+
8 rows in set (0.00 sec)

Updated on: 30-Jan-2020

53 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements