Mysql written in linux cannot be inserted, and the SQL statement becomes 'dirty' during replication _ MySQL

Source: Internet
Author: User
Mysql written in linux cannot be inserted, and the SQL statement changes bitsCN.com in the copy.
1: The fault description is developed in linux. when modifying the mysql field, you can use phpmyadmin to directly modify and generate the modified SQL statement, and then copy it to word (libreoffice) after submission to the project management system, a colleague cannot run after being sent to the project management system. so with this article. 2: first CREATE a TABLE [delphi] create table if not exists 'nns _ ad_log_count '('nns _ id' char (32) character set utf8 COLLATE utf8_unicode_ci not null comment 'ad ID', 'nns _ access_type 'tinyint (4) not null comment '0: 5 m 1: 1 h 2: 24 h = 1d ', 'nns _ access_day' date not null comment' which day ', 'nns _ access_ I Ndex 'Int (11) not null comment' interval, 5 m 1 h 1d = 24 h ', 'nns _ access_count' int (11) not null) ENGINE = InnoDb default charset = utf8; this step is OK. then, one field is added due to project extension, at the same time, you need to modify the field names of one TABLE and the default values and types of other tables [SQL] ALTER TABLE 'nns _ ad_log_count 'CHANGE 'nns _ id' 'nns _ ad_id' CHAR (32) character set utf8 COLLATE utf8_unicode_ci not null comment 'ad ID'; in the preceding step, it is an SQL statement generated after the field added by phpmyadmin. it looks OK and copied to word, then run mysql to report an error. Why is it like this? 3: error analysis. the generated SQL statement is clean. on the way, the colleague only pasted it into word. so I wrote this SQL statement and run it in mysql. (for testing, I copied the table structure and created a test table named 'nns _ ad_log_count1 ')

A normal colleague copied it only once and pasted it to the word (libreoffice). I repeated his action.
"1. open phpmyadmin in the browser and modify it once directly in phpmyadmin to generate the SQL statement "" 2. in phpmyadmin, copy the generated SQL to the system clipboard cache "" 3. paste it into word "" 4. repeat other modification operations. Repeat steps 1, 2, and 3 "5. send the entire word to "" 6. I copied the SQL statement in the word and ran "" 7. the error "open word, and the space of SQL statements is highlighted in word.

However, the preceding SQL statement is executed in phpmyadmin and cannot be seen directly in mysql.

The space is displayed. it turns out that this question has been clarified since now. the SQL statement is contaminated after being copied to word. but why is it contaminated like this? It is found that only after the word is pasted in, the space under utf8 will be replaced with  this should be a problem with the office tool in linux. here we will not describe 4: postscript, in linux, we recommend that you copy the SQL statement submitted for development to vim to view the detailed format, or to make it simpler, paste it in the address bar of the browser and copy it into word to submit the document. to avoid SQL errors.
BitsCN.com

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.