下面的查询将返回数据库的名称以及默认字符集 -
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)
以上是我们如何检查服务器上所有MySQL数据库的默认字符集?的详细内容。更多信息请关注PHP中文网其他相关文章!