Getting Error 1064 when trying to import db file - mysql

ERROR 1064 (42000) at line 33892 in file: 'contarproducts.sql': You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''\r\n \r\n
How can I resolve this issue?
Your help will be much appreciated.

1) You have this tagged as MySQL but then you seem to be running MariaDB, those aren't the same thing.
2) If there's an error in your SQL (which is what this is saying) and this SQL file was exported from the database it seems as though copying or moving the file cut it off and it didn't finish copying. If the file doesn't get fully copied and the end of the file looks like SELECT * FRO then that will be a syntax error.
Try re-exporting the file before importing it again.

Related

Error during importing a mysql database from 5.6.34 to 5.7.x

I am importing a .sql file using MySQL WorkBench but getting an error for syntax. The sql file was obtained from a DB running 5.6.34 and new one is running 5.7.2.09.1. Here is the screenshot of the error.
ERROR 1064 (42000) at line 11347: 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 'DEFINER=`psx360`#`localhost` SQL SECURITY DEFINER */
Open the .sql file with your code editor such as vscode, then search and replace (like press CTRL + H) DEFINER=psx360#localhost SQL SECURITY DEFINER with blank value in the replace textbox. ie deleting all the occurence.

How to resolve an error while restoring database from mysql dump file

I have a mysql database dump file, while restoring database from this file, i am getting an error like below
Database Restore Wizard: Error (102,1):
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 ''%PDF-1.4\r%âãÏÓ\r\n6 0 obj <</Linearized 1/L 139168/O 8/E 135033/N 1/T 1390' at line 1
The error occurs while inserting file as blob type. the causing the error is here
How to resolve this error.

#1064 error in importing database php mysql localhost

I have backup of my live site's database. I want to run it on localhost. I tried to import the back up database that I craeted in phpmyadmin/localhost. But I am getting error something like this:
1064 - 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 '
"http://www.w' at line 1
Can Any one help me....
This doesn't look like an SQL file, but as Krister Andersson suggested, you should post a few lines so we can see exactly what you are dealing with. How did you create the backup? What file type does it claim to be (is there an extension on the file)?

importing .sql3 and csv file into mysql workbench

This is may be foolish question. But i cant find the answer of this problem anywhere.
i have a .sql3 and a .csv file i want do import functionality in my mysql workbench using any of these file.
right now i dont have any tables and shemas in my mysql
when i am importing my demo.csv or demo.sql3 files in my workbench its showing an error like
ERROR 1064 (42000) at line 1: 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 'SQLite format 3' at line 1
I am on ubuntu
can anyone help me out from this problem
thanks in advance
For reading csv data into MySQL LOAD DATA is probably the best way to go. There's a plugin in MySQL WOrkbench for importing CSV data but it requires an existing result set.

Import multiple large sql dump mysql

I want to import several .sql files into database using source command (mysql command line). But when I get this error:
source E:\Progs\Backups\DBs\file01.sql
ERROR:
Unknown command '\P'.
ERROR 1064 (42000): 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 'sourc
e E:\Progs' at line 1
....
I used source command to import large files hundreds times but now I can not understand what I'm doing wrong. This is my system(I'm using XAMPP (Basis Package) version 1.7.3 :
Windows 7x64
MySQL 5.1.41 (Community Server) with PBXT engine 1.0.09-rc
Any help would be appreciated.
Thanks!
Edit:
I tried this one, but same error:
source 'E:\Progs\Backups\DBs\file01.sql'
MySQL sees the \P in E:\Progs as a command. Because that command does not exist, it complains.
Forward slashes are understood in many cases. Try:
source E:/Progs/Backups/DBs/file01.sql