473,498 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3571
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
1824
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 > table This produces a file per table, and that...
8
17479
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: > mysqldump "--where=ent_date > \"2003-07-01\""...
1
518
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 (don't forget quotes if string) database table >...
3
7889
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 error. Any suggestion?
7
7395
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...
0
1418
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 machine to another. The dump consists of a cluster of...
1
4020
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 information. It seems to max out at about 10mb. 2)...
5
3257
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 response: ERROR 1064 (42000): You have an error in your...
7
4702
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 = 'localhost'; $dbuser = 'root'; $dbpass =...
0
7125
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,...
0
7002
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...
0
7203
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...
1
6885
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...
0
7379
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...
0
5462
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,...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
290
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...

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.