473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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 7392
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********************@speakeasy.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.net> wrote in message news:<cc**********@sparta.btinternet.com>...
"Adam Smith" <ad*******@econ.com> wrote in message
news:nf********************@speakeasy.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
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 ! ...
0
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:...
0
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 ...
2
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? ...
4
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...
4
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...
1
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
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...
7
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.