PDA

View Full Version : mysqldump (or me) not working


dank
06-07-2001, 02:57 AM
I'm getting the following error no matter what format I try for mysqldump:

ERROR 1064:[nbsp][nbsp]You have an error in your SQL syntax near ... at line 1
I've tried every format under the sun (despite it being dark out) to no avail.

mysqldump -uxUSERNAME -p --add-drop-table xDATABASE > data.txt;
mysqldump -uxUSERNAME -p --add-drop-table xDATABASE > ./data.txt;
mysqldump -uxUSERNAME -p --add-drop-table xDATABASE >./data.txt;
mysqldump -uxUSERNAME -p xDATABASE >./data.txt;
mysqldump xDATABASE >./data.txt;
mysqldump --opt -uxUSERNAME -p -hmysql01.FutureQuest.net xDATABASE >./data.txt;
mysqldump -uxUSERNAME -p -hmysql.run-down.com xDATABASE >./data.txt;
mysqldump -uxUSERNAME -p -hmysql01 xDATABASE >./data.txt;

(substituting the username and database where noted, of course) and at least another dozen variations.[nbsp][nbsp]According to the following pages, at least one of those ought to work...

http://www.aota.net/PHP_and_MySQL/mysqldump.php3
http://www.aota.net/ubb/Forum15/HTML/000507-1.html
http://www.aota.net/ubb/Forum15/HTML/000354-1.html

I've used mysqldump before without trouble (as I recall), but this one is kicking my butt.[nbsp][nbsp]Any insight would be appreciated.

Dfeated

edit:[nbsp][nbsp]this is through telnet.

edited again for bleary eyed grammatical and spelling errors...

[This message has been edited by dank (edited 06-07-01@02:06 am)]

Terra
06-07-2001, 03:07 AM
ok - I took a moment to check and you have several Gold accounts...

Which domain are you trying this from?

One more thing you might want to try for kicks:
$history | grep mysqldump | less

look around the top for possibly saved successful command invocations...

Just to mention, nothing has changed with the MySQL core and mysqldump has always worked flawlessly across all versions/upgrades...

--
Terra
sysAdmin
FutureQuest

dank
06-07-2001, 10:57 AM
I hid the domain deep within the above message.[nbsp][nbsp]:)
mysqldump -uxUSERNAME -p -hmysql.run-down.com xDATABASE >./data.txt; One thing I wasn't sure about is the changes to the MySQL host names, depending on age of the account, so I tried multiple variations based on that.[nbsp][nbsp]Didn't seem to make a difference though, especially since my old mysql01.FutureQuest.net method worked for logging into MySQL.

Entering $history | grep mysqldump | less prompts me for the line ending semicolon, and once entering that, I get the same ERROR 1064 as above...

I suppose while I'm waiting for someone to point me to the light, I can try the same thing out on another Gold account and see if I am indeed going crazy.

Gold Digger

dank
06-07-2001, 11:08 AM
Er, I got it working...[nbsp][nbsp]A few hours of sleep seemingly helps the combination of reading instructions and typing what you mean to.[nbsp][nbsp]I was trying to invoke mysqldump after logging in to MySQL.[nbsp][nbsp]Although it didn't seem like that was the right thing to do, I had first unsuccessfully tried it without logging in (to the MySQL engine), which probably means I had mis-typed something.

Dan

Terra
06-07-2001, 11:28 AM
LOL

'nuff said...[nbsp][nbsp];)

--
Terra
--Sleep Dprivation--
FutureQuest

dank
06-07-2001, 11:47 AM
'nuff said... That's an understatement![nbsp][nbsp]:)

In my defense, while searching for an answer last night, I read in the MySQL book that mysqldump should be useable from the mysql prompt without entering user/hostname/password, which strongly implies to me first having logged in...

Dan