mysql 中文乱码问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a912293097/article/details/46049907

mysql版本:mysql-5.6.24-win32

好多教程都是修改 ini文件,全局的修改配置。 反对者认为这是不明智的。

其实只需要在创建表的时候指定下字符集就可以解决问题。

"CREATE TABLE if not exists `PationtInfo` (`id` int(11)  AUTO_INCREMENT,`uniqueid` text,`name` text,`age` int,`sex` text,`phonenum` text,`email` text,PRIMARY KEY (`id`))ENGINE = InnoDB DEFAULT CHARSET = utf8";

ENGINE = InnoDB DEFAULT CHARSET = utf8 即可解决输入乱码的问题

猜你喜欢

转载自blog.csdn.net/a912293097/article/details/46049907