472,096 Members | 2,301 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 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 3107
>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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mangina | last post: by
reply views Thread by Thiko | last post: by
7 posts views Thread by Adam Smith | last post: by
reply views Thread by mcstayinskool | last post: by
1 post views Thread by Greg.Harabedian | last post: by
6 posts views Thread by Todd Cary | last post: by
6 posts views Thread by Robert Blackwell | last post: by
6 posts views Thread by Antoni | last post: by
reply views Thread by leo001 | last post: by

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.