I tried importing a CSV file in MySQL via the data import wizard.
My CSV file has 70,000 records but only 61 are imported.
I tried checking the CSV file, recreating the file from source, and changing the location of the CSV file, but nothing works.
I even reinstalled MySQL version 8.0.25.
Please suggest a solution or any other way of importing.
-
1Are there any errors? Have your looked at the data on line 61/62 ? Is the data different ?armitage– armitage2021年05月27日 07:30:23 +00:00Commented May 27, 2021 at 7:30
-
2but only 61 are imported This means that 62th rows causes an error. Import using CLI (LOAD DATA INFILE) and look for error.Akina– Akina2021年05月27日 07:31:24 +00:00Commented May 27, 2021 at 7:31
-
When you say "recreated data from ... where I took it" do you mean there is another MySQL database that has the source data you're migrating?matigo– matigo2021年05月27日 07:46:14 +00:00Commented May 27, 2021 at 7:46
1 Answer 1
Try using mysqldump
command for dumping data from source to destination server.
Step1 : Take backup from Source server for particular table.
mysqldump --single-transaction --set-gtid-purged=OFF --force -h 192.168.XX.XX -u user_name -p --databases database_name --tables table_name --lock-tables=false > mysql_user.sql
Step2 : Restore the backup on Destination.
mysql -u user_name -p -h192.168.X.X database_name < mysql_user.sql
-
The question has nothing to do with migrating data from one db to another.RonJohn– RonJohn2023年04月02日 07:11:18 +00:00Commented Apr 2, 2023 at 7:11
-
He asked to "Please suggest a solution or any other way of importing"JYOTI RAJAI– JYOTI RAJAI2023年04月03日 09:52:54 +00:00Commented Apr 3, 2023 at 9:52
-
"Please suggest a solution or any other way of importing" a csv file, not a database dump.RonJohn– RonJohn2023年04月03日 13:18:17 +00:00Commented Apr 3, 2023 at 13:18