Home  >  Article  >  类库下载  >  The solution process for viewing garbled mysql data in phpmyadmin

The solution process for viewing garbled mysql data in phpmyadmin

高洛峰
高洛峰Original
2016-10-14 10:27:111240browse

The php query in phpmyadmin is garbled and the php query is also garbled

But it is normal after using set names latin1 to connect to the database in php

So I use mysqldump to export

mysqldump --default-character-set latin1 -uroot -p dayanmei_com > dayanmei.sql

Open it with text and find that the content is displayed normally

So

set all DEFAULT CHARSET=latin1 Remove

and import again

SET NAMES latin1 and change it to SET NAMES utf8

The query is normal


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Related articles

See more