473,703 Members | 2,512 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error on - Restoring from full mysqldump

Hope this is the right news group!!
I did a server upgrade and at the same time did a mysql update from
4.0.12 to Ver 12.22 Distrib 4.0.16

mach1# mysql --version
mysql Ver 12.22 Distrib 4.0.16, for portbld-freebsd4.9 (i386)

I attempted to restore the DB with

mysql> LOAD DATA INFILE /usr/home/adam/Temp_storage/mysqldump/dump_all;

and got the following Error message ==>

ERROR 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 '/usr/home/adam/Temp_storage/mysqldump/dump_all' at line 1
mysql>

Inspection of the dumped file ==>

head /usr/home/adam/Temp_storage/mysqldump/dump_all
-- MySQL dump 9.07
--
-- Host: localhost Database:
---------------------------------------------------------
-- Server version 4.0.12-log

--
-- Current Database: bpndb
--
Could someone advise

Thanks
-- Adam --

Jul 20 '05 #1
7 7408
missing quote marks around the path, and missing table name?

Adam Smith wrote:
Hope this is the right news group!!
I did a server upgrade and at the same time did a mysql update from
4.0.12 to Ver 12.22 Distrib 4.0.16

mach1# mysql --version
mysql Ver 12.22 Distrib 4.0.16, for portbld-freebsd4.9 (i386)

I attempted to restore the DB with

mysql> LOAD DATA INFILE /usr/home/adam/Temp_storage/mysqldump/dump_all;

and got the following Error message ==>

ERROR 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 '/usr/home/adam/Temp_storage/mysqldump/dump_all' at line 1
mysql>

Inspection of the dumped file ==>

head /usr/home/adam/Temp_storage/mysqldump/dump_all
-- MySQL dump 9.07
--
-- Host: localhost Database:
---------------------------------------------------------
-- Server version 4.0.12-log

--
-- Current Database: bpndb
--
Could someone advise

Thanks
-- Adam --

Jul 20 '05 #2
Thanks David

In doing a full mysqldump there are several hundred tables in the file ?

-- Adam --

David L wrote:
missing quote marks around the path, and missing table name?

Adam Smith wrote:
Hope this is the right news group!!
I did a server upgrade and at the same time did a mysql update from
4.0.12 to Ver 12.22 Distrib 4.0.16

mach1# mysql --version
mysql Ver 12.22 Distrib 4.0.16, for portbld-freebsd4.9 (i386)

I attempted to restore the DB with

mysql> LOAD DATA INFILE
/usr/home/adam/Temp_storage/mysqldump/dump_all;

and got the following Error message ==>

ERROR 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 '/usr/home/adam/Temp_storage/mysqldump/dump_all' at
line 1
mysql>

Inspection of the dumped file ==>

head /usr/home/adam/Temp_storage/mysqldump/dump_all
-- MySQL dump 9.07
--
-- Host: localhost Database:
---------------------------------------------------------
-- Server version 4.0.12-log

--
-- Current Database: bpndb
--
Could someone advise

Thanks
-- Adam --


Jul 20 '05 #3
Hi David,
I should have mentioned that the dump itself contains 5 or 6 distinct
databases and all their tables ==> the full complement being about 250+
-- Adam --

David L wrote:
missing quote marks around the path, and missing table name?

Adam Smith wrote:
Hope this is the right news group!!
I did a server upgrade and at the same time did a mysql update from
4.0.12 to Ver 12.22 Distrib 4.0.16

mach1# mysql --version
mysql Ver 12.22 Distrib 4.0.16, for portbld-freebsd4.9 (i386)

I attempted to restore the DB with

mysql> LOAD DATA INFILE
/usr/home/adam/Temp_storage/mysqldump/dump_all;

and got the following Error message ==>

ERROR 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 '/usr/home/adam/Temp_storage/mysqldump/dump_all' at
line 1
mysql>

Inspection of the dumped file ==>

head /usr/home/adam/Temp_storage/mysqldump/dump_all
-- MySQL dump 9.07
--
-- Host: localhost Database:
---------------------------------------------------------
-- Server version 4.0.12-log

--
-- Current Database: bpndb
--
Could someone advise

Thanks
-- Adam --


Jul 20 '05 #4
just reading up on the syntax again, and it looks to me you can't doing
all in one go. http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html

From looking on mysqldump,
http://dev.mysql.com/doc/mysql/en/mysqldump.html,

I think you'd just play back the dump files in the mysql console. (but
i have no experience in doing that)

Have a look at http://dev.mysql.com/doc/mysql/en/mysqlhotcopy.html as
another way to do backup (much quicker).
Adam Smith wrote:
Hi David,
I should have mentioned that the dump itself contains 5 or 6 distinct
databases and all their tables ==> the full complement being about 250+
-- Adam --

David L wrote:
missing quote marks around the path, and missing table name?

Adam Smith wrote:
Hope this is the right news group!!
I did a server upgrade and at the same time did a mysql update from
4.0.12 to Ver 12.22 Distrib 4.0.16

mach1# mysql --version
mysql Ver 12.22 Distrib 4.0.16, for portbld-freebsd4.9 (i386)

I attempted to restore the DB with

mysql> LOAD DATA INFILE
/usr/home/adam/Temp_storage/mysqldump/dump_all;

and got the following Error message ==>

ERROR 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 '/usr/home/adam/Temp_storage/mysqldump/dump_all'
at line 1
mysql>

Inspection of the dumped file ==>

head /usr/home/adam/Temp_storage/mysqldump/dump_all
-- MySQL dump 9.07
--
-- Host: localhost Database:
---------------------------------------------------------
-- Server version 4.0.12-log

--
-- Current Database: bpndb
--
Could someone advise

Thanks
-- Adam --

Jul 20 '05 #5
Hi David,

I was just wondering if the problem was more pervasive than I had
thought, so I began looking at the whole sytem setup, which I only just
acquired, I have a new post Subj: MySQL setup, Another twist - To
mysqldump restoration ?, which I just posted. May want to take a look at
it, if you will.

Thanks

-- Adam --

David L wrote:
just reading up on the syntax again, and it looks to me you can't doing
all in one go. http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html

From looking on mysqldump,
http://dev.mysql.com/doc/mysql/en/mysqldump.html,

I think you'd just play back the dump files in the mysql console. (but
i have no experience in doing that)

Have a look at http://dev.mysql.com/doc/mysql/en/mysqlhotcopy.html as
another way to do backup (much quicker).
Adam Smith wrote:
Hi David,
I should have mentioned that the dump itself contains 5 or 6 distinct
databases and all their tables ==> the full complement being about 250+
-- Adam --

David L wrote:
missing quote marks around the path, and missing table name?

Adam Smith wrote:

Hope this is the right news group!!
I did a server upgrade and at the same time did a mysql update from
4.0.12 to Ver 12.22 Distrib 4.0.16

mach1# mysql --version
mysql Ver 12.22 Distrib 4.0.16, for portbld-freebsd4.9 (i386)

I attempted to restore the DB with

mysql> LOAD DATA INFILE
/usr/home/adam/Temp_storage/mysqldump/dump_all;

and got the following Error message ==>

ERROR 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 '/usr/home/adam/Temp_storage/mysqldump/dump_all'
at line 1
mysql>

Inspection of the dumped file ==>

head /usr/home/adam/Temp_storage/mysqldump/dump_all
-- MySQL dump 9.07
--
-- Host: localhost Database:
---------------------------------------------------------
-- Server version 4.0.12-log

--
-- Current Database: bpndb
--
Could someone advise

Thanks
-- Adam --


Jul 20 '05 #6
"Adam Smith" <ad*******@econ .com> wrote in message
news:nf******** ************@sp eakeasy.net...
[SNIP]
ERROR 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 '/usr/home/adam/Temp_storage/mysqldump/dump_all' at line 1
mysql> [SNIP] -- Host: localhost Database:
---------------------------------------------------------
-- Server version 4.0.12-log

[SNIP]

I've also had problems doing this.

Solution.... Delete the line of dashes!

Worked for me!
Jul 20 '05 #7
I always have to change the -- to # to get it to work. Also, I usually do
$ mysql -u me -p tableName < fileName

I've only used LOAD_DATA... for csv type files. This is what has worked for me.

"2metre" <ne**@hersham.n et> wrote in message news:<cc******* ***@sparta.btin ternet.com>...
"Adam Smith" <ad*******@econ .com> wrote in message
news:nf******** ************@sp eakeasy.net...
[SNIP]
ERROR 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 '/usr/home/adam/Temp_storage/mysqldump/dump_all' at line 1
mysql>

[SNIP]
-- Host: localhost Database:
---------------------------------------------------------
-- Server version 4.0.12-log

[SNIP]

I've also had problems doing this.

Solution.... Delete the line of dashes!

Worked for me!

Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4933
by: Frank | last post by:
I can use mysqldump to create a .sql file backup of my data.. For importing how can I test to see if the DB exists, if it does import the .sql If not create the DB then import the .sql ! Thanks
0
1401
by: Todd Cary | last post by:
I have a file produced by mysqldump and I need to restore it. Can someone point me toward the instructions on how to do this? Todd -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql
0
536
by: Kim | last post by:
How do I restore a single database (selectively) from a mysql dump of many databases. ie: I have a server with a few databases on it, I have run: mysqldump --all-databases > all_databases.sql Which has created a nice file ..... Now what do I do if I just want to restore just one of the databases I have just dumped into this file. Thnks for any info.
2
3244
by: Raffi | last post by:
I use the --all-databases switch to backup my entire database. Sometimes there's a need to restore individual databases or tables form the backup file. What command should I use for this? Thanks, Raffi
4
15604
by: 21novembre | last post by:
Hi all, I got a quite strange problem when I tried to setup a database backup shell. I put it this way: "bin/mysqldump --opt --user=xxx --password=xxx DB > DB.bak" However, error 1045 came to me to say "Access denied for user 'xxx'@'localhost' (using password: YES) when trying to connect". None the less, I'm absolutely full of confidence on my correct username and password, simply because if I do it this way: "bin/mysqldump --opt...
4
1781
by: Raffi | last post by:
Hi, I'm developing a database application that uses numeric databases. At this point not using numeric databases is not an option. Doing a mysqldump works. However when trying to restore the database with "mysql -u root -psecret < backup.sql" gives the following error message: ERROR 1064 at line 11: You have an error in your SQL syntax near '123456789' at line 1
1
1520
by: Shiraz | last post by:
i did "select * into outfile 'data.sql' from CDRS" to backup my data. what is the reverse to get the data back in? it looks liek the fields are delimited by tabs in the file. tjanks
0
3823
by: Chuck W1CEW | last post by:
So we have a MySQL database that suddenly started reporting "can't open *.ibd file" errors on InnoDB tables in phpMyAdmin. (MyISAM are fine). To recover the data is all I want at this point -- so one suggestion I came across was to try and dump using mysqldump like this: mysqldump -u root -p mydatabase databasedump.sql Enter password: ******************* mysqldump: Got error: 1016: Can't open file: 'access.ibd' (errno: 1) when using
7
6046
by: samalphins | last post by:
I have very strange error mysqldump: Got error: 1045: Access denied for user ''@'localhost' (using p assword: YES) when trying to connect I have installed mysql freshly with blank password for user "root" when I am trying perform backup with mysqldump I am getting the strange error I am trying with the folowing command d:\xampp\mysql\bin\mysqldump -u -p
0
8757
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8669
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9251
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9117
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7864
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6588
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4430
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3123
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.