ArticleDirectory
MySQL 1267 error Solution
MySQL 1267 error Solution
If the character set used during table creation is different from the default MySQL character set, the following error occurs frequently during query operations, especially
Python is a little difficult to process Chinese characters, and coding is always a problem.
When you use python to insert a Chinese character into MySQL, it will appear and check that the database contains garbled characters, or it will show that
This article mainly describes how to useSource codeTo install MYSQL:
Download the MySQL source code package and place it in/usr/local/src. Assume that my source code package is mysql.5.1.tar.gz.
Create a user group and a user
Groupadd
Premise: Text data must be formatted, such as the following format
Zhang San | 1988.2.3 | Wuhan, Hubei Province | Wuhan University
Li Si | 990.5.6 | Hunan Xiangtan | Hunan University
Wang Wu | 1991.6.12 | Beijing Institute of Technology
To perform a query in the past few days, You need to query in a specified result set, for example:
Select * From table_name where doc_id in ('1dba ', 'c20a', '907b ')
The doc_id list in the in Clause obtains a list of doc_id Constants by
MyISAM supports three storage formats: fixed, dynamic, and compressed (only created using myisampack ).
Static table features (fixed format)
The static format is the default storage format of the MyISAM table. This format is used when the
Solution to MySQL error 1267
The MySQL 1267 error occurs every time you transfer data to a new database:
Error: Illegal mix of collations (latin1_swedish_ci, implicit) and (gbk_chinese_ci, coercible) for Operation '='
This is an Encoding
Think about how to manipulate a database in Java requires a database driver. Of course, Ruby is no exception. Naturally, a database driver is required. I feel a little more complicated to install the database driver in Ruby than in Java.
When I used the database, I encountered a garbled problem. At that time, it was a headache. However, there is always a solution to this problem, but it was just a matter of time, so the friends who saw this post hope to help you,
I. First, it
1. Use Delphi to connect to the MySQL database. Two methods are recommended: dbexpress and ODBC. Dbexpress is highly efficient, but it is troublesome for local client datasets. ODBC is very common. If ODBC is used as the database access layer, it is
In MySQL, the unique key is used to control the non-repeated field values.
Create Table 'tb _ region '('Id' bigint (20) not null auto_increment,'Version' decimal (10, 0) default null,'Region _ name' varchar (80) not null default '','Region _
MySQL Command summary:Open mysql.exe and enter the passwordLogon operationMysql-u root-P;Database OperationsShow databases; displays the databaseCreate Database db_name; Create a databaseUse db_name; use the databaseSource D:/DB. SQL; import
Due to the needs of the project, I also began to contact mysql. There are many commands. Of course, there will be a lot of problems. Here, I will record them a little bit and make a little deeper, that is, sharing is also a memory, hope to encourage
When a website grows, MySQL naturally becomes a bottleneck. Therefore, MySQL optimization becomes a problem that needs to be considered. The first step is to naturally consider the optimization of MySQL system parameters. As a system with a large
MySQL database backup, and then studies how to call the CMD command in Java to implement the backup function of mysqldump. The specific implementation is as follows:
1. Set the environment variable first: there are two ways. First, add mysql_home to
Mysqldump command
MySQL mysqldump is used for MySQL database export. The basic usage is as follows:
Shell> mysqldump [Options] database [Tables]
If you do not specify any tables, the entire database will be exported. Run mysqldump --
Method 1:
The solution is to add the "binary" attribute to a field that contains Chinese characters for Binary comparison. For example, change "name char (10)" to "name char (10) binary ".
Method 2:
If you use the source code to compile MySQL,
LAST_INSERT_ID()
A is the host, B is the backup machine, and is also a dual-nic, and can be connected through the IntranetA Intranet IP Address: 192.168.195.28B Intranet IP Address: 192.168.195.30The database version (5.0.22), directory, initial
MySQL is a very simple and practical database. Currently, it can be integrated with many programming languages. Although the go language is quite young, it seems that it will always be used to catch up with the trend. I just tried the go language to
The default encoding of the MySQL database is not UTF-8.
After installing MySQL, start the service and log on to the MySQL database. Run the show variables command to view the default encoding of the MySQL database:
The character set of the
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