mysql5.5 version After insertion noon display question mark solution

Source: Internet
Author: User

First look at the result of the noon change question mark

Now let's see how we build the database and build the table.

See here believe that everyone knows the creation is successful, yes, the database and the table is created successfully, but when you enter the information with the Chinese language when the question mark is displayed.

Now with the traditional solution

When viewing the contents of the following table

You will find that or at noon to become a question mark, I personally found on the Internet that the version of 5.5 after the revision is not possible. I'm not sure if that's what I'm thinking. (I personally use version 5.6)

This is the time for us to change the way we do it:

1. Set up a database to specify a character set

default set UTF8 collate utf8_general_ci;

2. Create a data representation to specify a character set as well:

CREATE TABLE IF not EXISTS ' mydb ' (  ' username ' varchar (a) not NULL,  int( C10>11) not NULL, ENGINE=innodb DEFAULT Charset=utf8;

I input a Chinese-language data myself

mysql5.5 version After insertion noon display question mark solution

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.