SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = DB_Name; USE DB_Name; ALTER DATABASE DB_Name DEFAULT CHARACTER SET = utf8 DEFAULT COLLATE=utf8_general_ci; SET NAMES UTF8;
COLLATEattributes are not present, the database character set and collation in effect at routine creation time are used. To avoid having the server use the database character set and collation, provide explicit
COLLATEattributes for character data parameters.
If you change the database default character set or collation, stored routines that use the database defaults must be dropped and recreated so that they use the new defaults.