How do I see what character set a MySQL database / table / column is?

Here’s how I’d do it – For Schemas (or Databases – they are synonyms): SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = “schemaname”; For Tables: SELECT CCSA.character_set_name FROM information_schema.`TABLES` T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA WHERE CCSA.collation_name = T.table_collation AND T.table_schema = “schemaname” AND T.table_name = “tablename”; For Columns: SELECT character_set_name FROM information_schema.`COLUMNS` WHERE table_schema = “schemaname” AND table_name … Read more

How do I get a consistent byte representation of strings in C# without manually specifying an encoding?

Contrary to the answers here, you DON’T need to worry about encoding if the bytes don’t need to be interpreted! Like you mentioned, your goal is, simply, to “get what bytes the string has been stored in”. (And, of course, to be able to re-construct the string from the bytes.) For those goals, I honestly … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)