469,625 Members | 1,862 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

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 3400
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Dan F | last post: by
8 posts views Thread by Irvin Amoraal | last post: by
3 posts views Thread by g00g0 | last post: by
7 posts views Thread by Adam Smith | last post: by
reply views Thread by Adam Smith | last post: by
5 posts views Thread by Richard | last post: by
7 posts views Thread by damezumari | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.