473,387 Members | 1,669 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,387 software developers and data experts.

mysqldump failure

Hi All,

I issued the command:

mysqlmysqldump pmtallocmodel_development >
K:/_Projects/Ruby/Backup/pmtdev_2006.07.15.txt;

I got the response:

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 'mysqldump pmtallocmodel_development >
K:/_Projects/Ruby/Backup/pmtdev_2006.07.15' at line 1

I've got an empty file pmtdev_2006.07.15.txt in
K:\_Projects\Ruby\Backup :

Directory of K:\_Projects\Ruby\Backup

07/15/2006 10:56 PM <DIR .
07/15/2006 10:56 PM <DIR ..
07/15/2006 10:56 PM 0 pmtdev_2006.07.15.txt
1 File(s) 0 bytes

I've got a database with one table:

mysqlshow tables;
+-------------------------------------+
| Tables_in_pmtallocmodel_development |
+-------------------------------------+
| payments |
+-------------------------------------+
1 row in set (0.02 sec)

The table has two rows:

mysqlselect * from payments;
+----+-----------+---------+--------------+---------+------------+------------+-----------------------------------------
-----------------------------------------+
| id | check_num | cust_id | payee | amount | check_date |
post_date | note
|
+----+-----------+---------+--------------+---------+------------+------------+-----------------------------------------
-----------------------------------------+
| 1 | 2175 | 0 | Xyz Hotel | 415.33 | 2006-07-13 |
2006-07-15 | Cost of damage pkg deducted, per agreeme
nt with Mr. Pfefferkorn, July 10, 9:30am |
| 2 | 4325536 | 0 | Pqr Hospital | 4370.85 | 2006-07-10 |
2006-07-15 | Driver very helpful
|
+----+-----------+---------+--------------+---------+------------+------------+-----------------------------------------
-----------------------------------------+
2 rows in set (0.03 sec)

Can you see the cause of the mysqldump failure?

Regards,
Richard

Jul 16 '06 #1
5 3250
>I issued the command:
>
mysqlmysqldump pmtallocmodel_development >
K:/_Projects/Ruby/Backup/pmtdev_2006.07.15.txt;
You issue that command at a SHELL PROMPT, not to the mysql client.
Also, it all goes on one line.

Gordon L. Burditt

Jul 16 '06 #2
Thanks, Gordon,

That was a great response! I'm glad it was such a simple oversight.

Regards,
Richard
Gordon Burditt wrote:
I issued the command:

mysqlmysqldump pmtallocmodel_development >
K:/_Projects/Ruby/Backup/pmtdev_2006.07.15.txt;

You issue that command at a SHELL PROMPT, not to the mysql client.
Also, it all goes on one line.

Gordon L. Burditt
Jul 16 '06 #3
Hi Gordon,

One more (compound) question:

1. mysqldump only produced an Insert statement for one row, despite
the fact that the table contained two rows.

2. I'm relying on MySQL by DuBois from New Riders press, (c) 2000.
I've got to upgrade, especially since I've noted that ver. 5 supports
stored procedures. I like this book. Do you recommend upgrading to a
2005/6 version, or do you recommend something else?

Again, thanks for your help.

Regards,
Richard

Jul 16 '06 #4
>One more (compound) question:
>
1. mysqldump only produced an Insert statement for one row, despite
the fact that the table contained two rows.
Are you sure? One insert statement can insert many rows.
>2. I'm relying on MySQL by DuBois from New Riders press, (c) 2000.
To the best of my knowledge, that's a book, not software, and
if it came with software, it's probably in the 3.* series.
>I've got to upgrade, especially since I've noted that ver. 5 supports
stored procedures. I like this book. Do you recommend upgrading to a
2005/6 version, or do you recommend something else?
There's a lot of features I think you don't have: transactions,
sub-selects, stored procedures, views, etc. Also some security issues
are fixed. I don't know what you're using it for, so I don't know
whether you need these. In general, I'd recommend using a less ancient
version. If you are using it for production work, I don't recommend
a beta version. Current versions are around 5.0.22 for production,
5.1.11 for beta.

Gordon L. Burditt
Jul 16 '06 #5
Hi Gordon.

Thanks again for responding.
1. mysqldump only produced an Insert statement for one row, despite
the fact that the table contained two rows.

Are you sure? One insert statement can insert many rows.
Woops! I dumped the wrong table. Sorry for the false alarm :-(
2. I'm relying on MySQL by DuBois from New Riders press, (c) 2000.

To the best of my knowledge, that's a book, not software, and
if it came with software, it's probably in the 3.* series.
Right, I meant that's the textbook I'm relying on to code MySQL
statements. However, I'm running version: 5.0.15-nt. I'm a retired
software developer, so I still lean toward hard-copy documentation. I
was just wondering whether you had an opinion about the current version
of this book and whether you had an other recommendation.
There's a lot of features I think you don't have: transactions, ...
I'm looking forward to getting into them. I started with SQL with
Chris Date's book, whom you may know was a "disciple" of Edgar F.
Codd, the developer of the Relational model.
I don't know what you're using it for ...
Right now I'm implementing a model of a semi-automatic posting system
of checks to matching invoices using Ruby on Rails with MySQL. If the
client accepts the model, I'm going to implement it as Windows
implentation that massages data from the client's ancient (1980)
filePro account/inventory system running on a SCO server.

Also, I'll require the client to get a commercial license for MySQL,
though I haven't investigated that yet. Any comments would be welcome.

Regards,
Richard

Jul 16 '06 #6

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

Similar topics

4
by: Mangina | last post by:
Hello all. Can anyone see why this snippet of code isnt dumping the databases using mysqldump ? All the credentials are correct (changed for the purpose of this post). $host = "localhost";...
0
by: Thiko | last post by:
Hi We currently use mysqldump to dump all our db's in quick mode to one file, backup.sql. This file has come quite large. mysqldump -Aq -u root > /MySQL/backup/backup.sql I would now like...
7
by: Adam Smith | last post by:
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...
0
by: mcstayinskool | last post by:
I'm trying to dump a bugzilla installation to a file, then restore it to a different database name (so as to test my db backup system). I use mysqldump to dump it to a file: # mysqldump -u root...
1
by: Greg.Harabedian | last post by:
I'll start off by saying I am using MySQL v4.0 and my question is...how do I get mysqldump to dump the actual binary values store in a blob? Here is an example: -- Create a test table create...
6
by: Todd Cary | last post by:
My client is using a shared server running MySQL 2.4, however the in house server is 4.1.12 with mysqldump 10.9. Is there a way to have the 10.9 version output a format that is fully compatible...
6
by: Robert Blackwell | last post by:
I want to make a scheduled task in windows to do a mysqldump. Someone gave me this .bat to run but I'm not able to get it to work. REM @echo off for /f "tokens=1" %%i in ('date /t') do set...
6
by: Antoni | last post by:
Hello, I'm trying to make a daily database backup. When executing "mysqldump - uxxx -pxxx database /home/backup/ddbb.sql -q &" the httpd server gets blocked and my site is "offline" for 30...
0
by: Pratchaya | last post by:
How can i dump (mysqldump) with skip query logging ? Now, when i run mysqldump. mysql log ( query log ) default running/keeping all in result mysqldump. It's possible ? to run mysqldump...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.