473,686 Members | 2,101 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mysqldump failure

Hi All,

I issued the command:

mysqlmysqldump pmtallocmodel_d evelopment >
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_d evelopment >
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\Ru by\Backup :

Directory of K:\_Projects\Ru by\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_pmtal locmodel_develo pment |
+-------------------------------------+
| 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 3271
>I issued the command:
>
mysqlmysqldu mp pmtallocmodel_d evelopment >
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_d evelopment >
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
2603
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"; $user = "root"; $pass = "password"; $database = "database"; $dbname = array ("1","2","3","4","5");
0
493
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 to split the mysqldump so that the output comprises of several files of less than 2 gigabytes each. Does anyone know the mysqldump options that could be used to do this? Or with using the >
7
7408
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 4.0.16, for portbld-freebsd4.9 (i386) I attempted to restore the DB with
0
2268
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 -p<passwd> (misc. options) bugs > bugs.sql Then try to restore it to an empty DB, "foobar" with this command # mysql -u root -p<passwd> foobar < bugs.sql It fails, with this not-too-helpful error:
1
4681
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 table dummy(col1 blob); -- Next insert a null ascii character (0) insert into dummy values (char(0)); -- To verify there is actually something there type: select length(col1) from dummy;
6
5966
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 with 2.4? Some of the CREATE TABLE statements in 10.9 are not accepted by 2.4. Currently, I am not using any of the switches in creating the output file other than the -u, -h and -p. Todd
6
30084
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 DATE_DOW=%%i for /f "tokens=2" %%i in ('date /t') do set DATE_DAY=%%i for /f %%i in ('echo %date_day:/=-%') do set DATE_DAY=%%i for /f %%i in ('time /t') do set DATE_TIME=%%i
6
6160
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 minutes. I also tried using mysqlhotcopy, but with no success since it fails with error: "DBD::mysql::db do failed: Not unique table/alias: 'comments' at /usr/ bin/mysqlhotcopy line 466." I'd like to make a daily MySQL backup, but without freezing...
0
2925
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 without query logging ? ( when i run mysqldump .. i 'm not need to keey query log ) Thank you very much.
0
8585
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8517
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8934
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8770
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8780
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7603
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6441
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
2208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1940
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.