mysql中的schema 等价于database,相当于一个数据库
MySQL 中 Schema 等价于 数据库。 mysql> SELECT -> SCHEMA_NAME, -> DEFAULT_CHARACTER_SET_NAME, -> DEFAULT_COLLATION_NAME -> FROM -> INFORMATION_SCHEMA.SCHEMATA; +--------------------+----------------------------+------------------------+ | SCHEMA_NAME | DEFAULT_CHARACTER_SET_NAME | DEFAULT_COLLATION_NAME | +--------------------+----------------------------+------------------------+ | information_schema | utf8 | utf8_general_ci | | mysql | <a href="https://www.baidu.com/s?wd=latin1&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1d-uhfvnWPhmWDduHN9ujK-0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EP1DsP1b1nH61njTdnWRzP1md" target="_blank" class="baidu-highlight">latin1</a> | <a href="https://www.baidu.com/s?wd=latin1&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1d-uhfvnWPhmWDduHN9ujK-0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EP1DsP1b1nH61njTdnWRzP1md" target="_blank" class="baidu-highlight">latin1</a>_swedish_ci | | sqldoc | utf8 | utf8_general_ci | | test | <a href="https://www.baidu.com/s?wd=latin1&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1d-uhfvnWPhmWDduHN9ujK-0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EP1DsP1b1nH61njTdnWRzP1md" target="_blank" class="baidu-highlight">latin1</a> | latin1_swedish_ci | | test2 | latin1 | latin1_swedish_ci | +--------------------+----------------------------+------------------------+ 5 rows in set (0.00 sec)