标签:server show inno 中文显示 alt ges win rac mysql
全部使用utf8编码
MySQL中文乱码解决
mysql> show variables like "%char%";
SET character_set_client=‘utf8‘; SET character_set_connection=‘utf8‘; SET character_set_server=‘utf8‘;
mysql> show create database test;
ALTER DATABASE `test` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> show create table testTable;
ALTER TABLE `testTable` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
//建数据库 CREATE DATABASE `test` CHARACTER SET ‘utf8‘ COLLATE ‘utf8_general_ci‘;
//建数据表 CREATE TABLE `database_user` ( `ID` varchar(40) NOT NULL default ‘‘, `UserID` varchar(40) NOT NULL default ‘‘, ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
设置完成后,查询中文显示正常
navicat for mysql中文乱码
重新连接仍然乱码
重新连接仍然乱码
重新连接,显示正常
标签:server show inno 中文显示 alt ges win rac mysql
原文地址:http://www.cnblogs.com/mufire/p/6697994.html