MYSQL乱码
create database table_test DEFAULT CHARACTER SET utf8;//在创建数据库时指定编码
drop database IF EXISTS db_test; create database db_test; use db_test; create table temp( id int PRIMARY KEY AUTO_INCREMENT, name varchar(50) ); insert into temp(name) values('测试'); select *from temp; select * from information_schema.schemata where schema_name='db_test';
drop database IF EXISTS db_test; create database db_test DEFAULT CHARACTER SET utf8; use db_test; create table temp( id int PRIMARY KEY AUTO_INCREMENT, name varchar(50) ); insert into temp(name) values('测试'); select *from temp; select * from information_schema.schemata where schema_name='db_test';