Modify database Character Set __ database

Source: Internet
Author: User
Tags mysql command line

If you do not configure the MySQL environment variable in cmd, then in the system advanced settings where the MySQL environment variable settings. 2

Win+r, pull up "run", enter CMD, carriage return







3

Log in to the database,





4

View Database





5

View Database character encoding





6

modify via 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;





7

Of course there are:

Modify the database's character set Mysql>use mydb

Mysql>alter database mydb character set UTF8;

8

Create a database specify the character set of the database

Mysql>create database mydb character set UTF8;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.