Home > Database > Mysql Tutorial > How to change the character encoding of the database in mysql

How to change the character encoding of the database in mysql

coldplay.xixi
Release: 2020-10-15 11:32:20
Original
9520 people have browsed it

Mysql method to change the database character encoding: first call up "Run" and enter cmd; then log in to the database and view the database; finally modify the character set of the database, the code is [mysql>use mydb].

How to change the character encoding of the database in mysql

Related free learning: mysql database(Video )

Mysql method to change database character encoding:

1. Win R, call up "Run", enter cmd, and press Enter

How to change the character encoding of the database in mysql

2. Mysql method to change database character encoding

Log in to the database,

How to change the character encoding of the database in mysql

3.View Database

How to change the character encoding of the database in mysql

4. Check the database character encoding

How to change the character encoding of the database in mysql

5. Modify through the MySQL command line: (encoding optional)

mysql> set character_set_client=utf8;
mysql> set character_set_connection=utf8;
mysql> set character_set_database=utf8;
mysql> set character_set_results=utf8;
mysql> set character_set_server=utf8;
mysql> set character_set_system=utf8;
mysql> set collation_connection=utf8;
mysql> set collation_database=utf8;
mysql> set collation_server=utf8;
Copy after login

How to change the character encoding of the database in mysql

6. Of course:

Modify the character set of the database mysql>use mydb

mysql>alter database mydb character set utf8;
Copy after login

7. Create a database and specify the database Character set

mysql>create database mydb character set utf8;
Copy after login

The above is the detailed content of How to change the character encoding of the database in mysql. 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