3

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.

3
  • 1
    Are there any errors? Have your looked at the data on line 61/62 ? Is the data different ?
    – armitage
    May 27, 2021 at 7:30
  • 2
    but only 61 are imported This means that 62th rows causes an error. Import using CLI (LOAD DATA INFILE) and look for error.
    – Akina
    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
    May 27, 2021 at 7:46

1 Answer 1

0

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
3
  • The question has nothing to do with migrating data from one db to another.
    – RonJohn
    Apr 2, 2023 at 7:11
  • He asked to "Please suggest a solution or any other way of importing" Apr 3, 2023 at 9:52
  • "Please suggest a solution or any other way of importing" a csv file, not a database dump.
    – RonJohn
    Apr 3, 2023 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.