简体   繁体   中英

Error when importing SQL Dump from an equal source

I need to sync the database of a live server to our development system, so I did create a dump with mysqldump , zipped it, piped it to the other server, unzipped it and wanted to import said dump. Quite the no-brainer, right?

mysql -uroot -pPASS DBNAME < dump.sql

This is where the error occurs.

ERROR 1064 (42000) at line 270: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''{\\n \\"parsed_parameters\\":91,\\n \\"max_result\\":[\\n {\\"time\\":5076987.68,\\"outp' at line 1

Edit: This does also happen if I use the MySQL CL with source .

This is odd, as every technical aspect of the live system is equal to the dev system, the only difference is the backend and the data in the database.

So I am wondering why I can't insert this dump despite having a comparable database with the same schema as the source.

Edit: Just for testing I created an empty database and got the same error.

But the thing I don't get is, that the process successfully imported exactly 500 rows with similar values. Maybe there is something with this 500 rows threshold?

You need to login first using below cmd

mysql -u <your-username> -p

After click enter it will asking for password please enter it, then using below you can import dump in specific schema.

use <schema-name>;
source database/filepath/dump.sql;

If you have not created schema then create it using below cmd first after login.

create schema your_schema_name;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM