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.