Home> 类库下载> PHP类库> body text

The solution process for viewing garbled mysql data in phpmyadmin

高洛峰
Release: 2016-10-14 10:27:11
Original
1215 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

set all DEFAULT CHARSET=latin1 Remove

and import again

SET NAMES latin1 and change it to SET NAMES utf8

The query is normal


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 Recommendations
    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!