This is to commemorate the 4 pitfalls I stepped on today... Pitfall 1: Local’s fault Error: mysql> load data infile … Pitfall 2: Wrong csv address Error: mysql> load data infile … Then put the csv file to be imported into the folder: mysql>load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/user_info_utf.csv' … Note: \ must be changed to / Pitfall 3: Wrong file format Error: Correction: To modify the file format, first open it with Excel, save as, save type - utf8, tools - web options - encoding utf8, replace the original file: Open it with Notepad, save as, save type - all files, encoding - utf8, replace the original file: Pitfall 4: Null value error Error: mysql> set @@sql_mode=ANSI; Notes: Finally climbed out of the pit: mysql>load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/user_info_utf.csv' into table data.userinfo fields terminated by ',' optionally enclosed by '"' escaped by '"'lines terminated by '\r\n'; Imported successfully! So touching! This concludes this article on 4 solutions to MySQL import errors in CSV. For more information on MySQL import errors in CSV, please search previous articles on 123WORDPRESS.COM or continue browsing the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Building a selenium distributed environment based on docker
>>: Common structural tags in XHTML
1. Download jdk download address我下載的是jdk-8u221-li...
Introduction to Selenium Grid Although some new f...
The significance of writing order Reduce browser ...
Required effect: After clicking to send the verif...
1. MYSQL index Index: A data structure that helps...
Linux grep command The Linux grep command is used...
Preface The effect problems used in personal actu...
Table of contents 1. MySQL compilation and instal...
animation Define an animation: /*Set a keyframe t...
1. Vulnerability Description On May 15, 2019, Mic...
Nginx's shared memory is one of the main reas...
1. What is As a markup language, CSS has a relati...
Table of contents JS reads file FileReader docume...
mysql installer community 8.0.16.0 installation g...
Table of contents 1. Background 2. Verification p...