472,345 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,345 software developers and data experts.

mysqldump with -where statement for windows (ver 3)

Here's the syntax, I've never been able to do this. I'm SURE it'll
help someone.!!!
mysqldump -hhost -uuser -ppassword -c -t -wfield=value (don't forget
quotes if string) database table > optionaltextfile.sql

bobb
Jul 19 '05 #1
3 3512
Seems like I had always been (taught) able to put the -w AFTER the db
and table name in *nix...
This doesn't work in windows. That was always the problem.
could never find it anywhere.
Thanks.
Aggro <sp**********@yahoo.com> wrote in message news:<Uj**************@read3.inet.fi>...
bobb wrote:
Here's the syntax, I've never been able to do this. I'm SURE it'll
help someone.!!!
mysqldump -hhost -uuser -ppassword -c -t -wfield=value (don't forget
quotes if string) database table > optionaltextfile.sql


mysql> use test;
Database changed
mysql> select * from country;
+------+---------+
| id | name |
+------+---------+
| 1 | Finland |
| 2 | Sweden |
+------+---------+
2 rows in set (0.01 sec)
mysqldump -h localhost -u root -c -t -p -w'id=1' test country > res.sql
Enter password:

mysqldump -h localhost -u root -c -t -p -w'name="Finland"' test country
> res.sql


Both of these worked for me. Using version 3 also.

Jul 19 '05 #2
bobb wrote:
Here's the syntax, I've never been able to do this. I'm SURE it'll
help someone.!!!
mysqldump -hhost -uuser -ppassword -c -t -wfield=value (don't forget
quotes if string) database table > optionaltextfile.sql
mysql> use test;
Database changed
mysql> select * from country;
+------+---------+
| id | name |
+------+---------+
| 1 | Finland |
| 2 | Sweden |
+------+---------+
2 rows in set (0.01 sec)
mysqldump -h localhost -u root -c -t -p -w'id=1' test country > res.sql
Enter password:

mysqldump -h localhost -u root -c -t -p -w'name="Finland"' test country res.sql


Both of these worked for me. Using version 3 also.

Jul 19 '05 #3
Seems like I had always been (taught) able to put the -w AFTER the db
and table name in *nix...
This doesn't work in windows. That was always the problem.
could never find it anywhere.
Thanks.
Aggro <sp**********@yahoo.com> wrote in message news:<Uj**************@read3.inet.fi>...
bobb wrote:
Here's the syntax, I've never been able to do this. I'm SURE it'll
help someone.!!!
mysqldump -hhost -uuser -ppassword -c -t -wfield=value (don't forget
quotes if string) database table > optionaltextfile.sql


mysql> use test;
Database changed
mysql> select * from country;
+------+---------+
| id | name |
+------+---------+
| 1 | Finland |
| 2 | Sweden |
+------+---------+
2 rows in set (0.01 sec)
mysqldump -h localhost -u root -c -t -p -w'id=1' test country > res.sql
Enter password:

mysqldump -h localhost -u root -c -t -p -w'name="Finland"' test country
> res.sql


Both of these worked for me. Using version 3 also.

Jul 19 '05 #4

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

Similar topics

0
by: Dan F | last post by:
Folks, I find it useful for browsing to dump each table of a DB, i.e. psuedo-code like foreach table mysqldump --add-drop-table DB table >...
8
by: Irvin Amoraal | last post by:
I am trying to create a CSV using mysqldump that will be viewed in MS Excel, and have a formatting question. From the command line I type: >...
1
by: bobb | last post by:
Here's the syntax, I've never been able to do this. I'm SURE it'll help someone.!!! mysqldump -hhost -uuser -ppassword -c -t -wfield=value...
3
by: g00g0 | last post by:
I have some some large tables, 30 mil rows, some rows has long blogs size (300M). I used mysqldump -q to dump it, but i still get out of memory...
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 ...
0
by: Adam Smith | last post by:
Hello, 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. Essentially, moving from one...
1
by: Dave Crypto | last post by:
Hi there, SUMMARY: 1) When I use phpadmin to export a large database, the file created on my local PC never containes all the tables and...
5
by: Richard | last post by:
Hi All, I issued the command: mysqlmysqldump pmtallocmodel_development > K:/_Projects/Ruby/Backup/pmtdev_2006.07.15.txt; I got the...
7
by: damezumari | last post by:
I use Windows XP and Apache. I am trying to backup a database on my local computer with the following php code: $dbname = 'ol'; $dbhost =...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

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.