Home > Database > Mysql Tutorial > The solution process for viewing garbled mysql data in phpmyadmin

The solution process for viewing garbled mysql data in phpmyadmin

高洛峰
Release: 2016-11-28 16:40:01
Original
1331 people have browsed it

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
Copy after login

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

So

all Remove DEFAULT CHARSET=latin1

Import again

SET NAMES latin1 and change it to SET NAMES utf8

The query is normal


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template