반응형

# DBMS character set change utf8 -> utf8mb4 

alter database DB명 character set utf8mb4 collate utf8mb4_unicode_ci;

 

# Table character set change utf8 -> utf8mb4 
alter table DB명.TABLE명 convert to character set utf8mb4 collate utf8mb4_unicode_ci;

 

# DB/Table select

SELECT table_schema,TABLE_NAME,table_collation FROM information_schema.tables 
WHERE table_schema NOT IN ('information_schema','mysql','performance_schema','sys')
ORDER BY 1,2 desc;

 

SELECT SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME,SCHEMA_COMMENT FROM information_schema.SCHEMATA 
WHERE schema_name NOT IN ('information_schema','mysql','performance_schema','sys')
ORDER BY 2,3

 

# DBMS DEFAULT character set select  

show variables like 'c%';

+ Recent posts