Is there a way in PHPMyAdmin to find out the charset of a table and/or a database?
The only thing that ist shown, is the collation. But as far as I understood, the collation only tells the database how to compare the data, and the charset tells the database how to store the data.
To see the default character set and collation for a given database, use these statements: USE db_name; SELECT @@character_set_database, @@collation_database; Alternatively, to display the values without changing the default database: SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.
You can get an idea of what character sets are used for the columns in a database as well as the collations using this SQL: select data_type, character_set_catalog, character_set_schema, character_set_name, collation_catalog, collation_schema, collation_name, count(*) count from information_schema.
Try writing a SQL command:
SELECT * FROM information_schema.SCHEMATA S
WHERE schema_name = "myDataBase";
You might want to check this answer and the comments on this ressoure;
Alternatively, you can also find it by just looking at the collation name itself in most of the cases. Say the collation name is "latin1_swedish_ci" then the character set for the database is "latin1".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With