mysql在控制台下显示乱码,请假各位大神
PHPz
PHPz 2017-04-17 14:42:35
0
3
680

在百度上搜过一些方法:
比如 1. 设置my.ini 文件,但本人mysql5.6 解压包里面只有my-default.ini,在这个文件里面添加 default-character-set=utf8,但exit 退出数据库,重新登录还是没有用; 2. 直接在命令行语句中设置 set names gbk; 也没有用,并且在我退出数据库,重新登录后,关于字符编码的设置又恢复到原来的样子。

PHPz
PHPz

学习是最好的投资!

reply all(3)
小葫芦

You should use administrator rights to change it

小葫芦

Your console encoding is wrong

Ty80

Those settings cannot essentially solve the problem. The crudest method is to back up your database tables first, that is, export the sql file, uninstall the mysql database and then reinstall it. One step during the installation process is to set the encoding format. Once you set UTF-8, it won’t be garbled

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!