How to solve the 1366 error in mysql, mysql1366

Source: Internet
Author: User

How to solve the 1366 error in mysql, mysql1366

Recently, I made a project for the school. oracle is used for the database. If oracle is installed in windows, it is relatively simple, but unfortunately, before I took over the project, I just switched to Mac, so this is a big problem. oracle's latest version does not support Mac OS. Currently, 10 Gb supports Mac OS, however, resources on the 10g Official website have been removed, but you can get the 10g oracle Installation Package for Mac through other channels. It is a little far away, and we will go back to our topic. Since oracle has not been installed on my Mac system, in order not to slow down the project progress, I will first use mysql for emergency response. However, when I install mysql on the system, an error occurs when I insert a piece of data, which is shown below:



Solution to this problem:

Visualization tool: When you create a database, remember to change Default Collation to UTF8 to solve this problem.

If you do not use a visualization tool, it will be a bit complicated:

Command line format:

Open the terminal: Enter the following command,

Cd/usr/local/mysql/bin

Vi msqld

Add

Default-storage-engine = INNODB
Character-set-server = utf8
Collation-server = utf8_general_ci

Then enter (: qw !)

================ It is said that the above method will cause mysql to fail to be started, and I have not encountered such a situation, if you love research problems, you can try it yourself. When you encounter a problem, it is a very good way of learning, with a deep memory. If you share it with everyone, your level will be higher.

This should be okay. There are many solutions to the command line.

I have not encountered this problem before using mysql, but I am still calm when I see this problem. I probably see that this error should be caused by an internal mysql setting error, so I went to du Niang to ask, there are a lot of answers, but they all feel that the answers are more complicated than the ones they encountered. I didn't say that their methods are not good, and their methods are very technical, I like cainiao, which is generally hard to understand. However, I probably know that the Chinese character strings are incorrect because the tools are developed by foreigners. Of course, the strings are not set to Chinese by default. So the future of China's software industry depends on you.

Related Article

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.