Home > Database > Mysql Tutorial > body text

What is the command to set encoding in mysql?

王林
Release: 2020-09-27 17:10:50
Original
2921 people have browsed it

The command for mysql to set encoding is: [SET character_set_database = utf8;]. We can view the database encoding by executing the [SHOW VARIABLES LIKE '%set%';] command.

What is the command to set encoding in mysql?

1. Check the encoding

(Recommended tutorial: mysql video tutorial )

SHOW VARIABLES LIKE '%set%';
Copy after login

2. Set the encoding to UTF-8

SET character_set_client = utf8;
SET character_set_connection = utf8;
SET character_set_database = utf8;
SET character_set_database = utf8;
SET character_set_results = utf8;
SET character_set_server = utf8;
SET character_set_system = utf8;
Copy after login

Related recommendations: php training

The above is the detailed content of What is the command to set encoding 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!