473,394 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 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 3567
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 > table This produces a file per table, and that...
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: > mysqldump "--where=ent_date > \"2003-07-01\""...
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 (don't forget quotes if string) database table >...
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 error. Any suggestion?
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 mach1# mysql --version mysql Ver 12.22 Distrib...
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 machine to another. The dump consists of a cluster of...
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 information. It seems to max out at about 10mb. 2)...
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 response: ERROR 1064 (42000): You have an error in your...
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 = 'localhost'; $dbuser = 'root'; $dbpass =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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
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...

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.