Home > Database > Mysql Tutorial > body text

What to do if mysql is garbled in xampp

WBOY
Release: 2022-05-12 15:25:57
Original
2191 people have browsed it

Method: 1. Add "default-character-set=gbk" under "no-auto-rehash" in the "my.ini" file; 2. Add "character-" after "port= 3306" set-server=gbk", save the changes and restart.

What to do if mysql is garbled in xampp

The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.

What to do if mysql is garbled in xampp

Description of phenomenon:

After XAMMP is installed, a MySQL database is built-in. After creating my own database, when I add some Chinese information to the table through hibernate, all the garbled characters turn into "??".

Problem solution:

1. Find D:\\xampp\\mysql\\bin\\my.ini in the installation directory, (my own path , the path here is the path where you installed xampp) open it with notepad;

2. Add default-character-set=gbk under no-auto-rehash under [mysql];

3. Add character-set-server=gbk under port= 3306 under [mysqld], save this line of code, and restart xampp.

Extended knowledge:

XAMPP (Apache MySQL PHP PERL) is a powerful website building integration software package. The original name of this package was LAMPP, but to avoid misunderstanding, the latest versions were renamed XAMPP. It can be installed and used under various operating systems such as Windows, Linux, Solaris, Mac OS X, etc., and supports multiple languages: English, Simplified Chinese, Traditional Chinese, Korean, Russian, Japanese, etc.

Many people realize through their own experience that installing an Apache server is not an easy task. If you want to add MySQL, PHP, and Perl, it's even harder. XAMPP is an easy-to-install Apache distribution that includes MySQL, PHP, and Perl. XAMPP is really easy to install and use: just download, unzip, and launch.

Recommended learning: mysql video tutorial

The above is the detailed content of What to do if mysql is garbled in xampp. For more information, please follow other related articles on the PHP Chinese website!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!