By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,461 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

mysqldump failure

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
>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

P: n/a
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

P: n/a
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

P: n/a
>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

P: n/a
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.