how do i run mysqldump?
Posted by: macrunning (---.hsd1.wa.comcast.net)
Date: September 19, 2010 09:42PM

HelloI,
Trying to figure out how to access mysqldump to export my databases. I have tried from the command line but must have the wrong info. Can someone help point me in the right direction as to how i can access mysqldump. Thanks,

jay

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: yfastud (Moderator)
Date: September 19, 2010 09:49PM

do you really need mysqldump? since it's more simple to copy and paste db by following my backup guide here

To setup Backup, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: macrunning (---.hsd1.wa.comcast.net)
Date: September 19, 2010 09:51PM

yes i need to run mysqldump. I have automation scripts and need to access mysqldump from command line if possible. Just dont know how to do it on wamp.

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: macrunning (---.hsd1.wa.comcast.net)
Date: September 19, 2010 09:55PM

P.S. I am not looking to backup WAMP. I am looking to export my individual databases using mysqldump as .sql statement.

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: yfastud (Moderator)
Date: September 20, 2010 05:27AM

then you need to setup CLI and from there to use commands winking smiley

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides



Edited 1 time(s). Last edit at 09/20/2010 11:23PM by yfastud.

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: macrunning (---.hsd1.wa.comcast.net)
Date: September 20, 2010 11:20PM

What is SLI and why does it need to be setup? I noticed in the mysql folder mysqldump is already in there? Just trying to figure this out. Thanks for your help.

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: yfastud (Moderator)
Date: September 20, 2010 11:26PM

sorry, it should be CLI stands for Command Line Interface that you use in php scripts

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: macrunning (---.hsd1.wa.comcast.net)
Date: September 26, 2010 10:19PM

Ok, your not helping me to much here. I am trying to use the command line. I am trying to find how to access the mysqldump command. Does anyone know.

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: yfastud (Moderator)
Date: September 27, 2010 02:32AM

through wamp tray icon, slecet mysql console and use mysqldump command from there or setup CLI to use mysqldump in php script

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: macrunning (---.hsd1.wa.comcast.net)
Date: September 29, 2010 12:22AM

Yes, I underdstand what you are saying. But there are no directions or help in the WAMP to indicate what I need to write in the mysql console to access the dump. What I have on my other computer does not seem to be working in WAMP. On my other computer I actually access the command line (cmd.exe) in windows and write a dump statement. It is not working when I open up the mysqld console in wamp.

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: yfastud (Moderator)
Date: September 29, 2010 04:12AM

they're the same; the only thing different is that you have to navigate to mysql folder when using cmd, but w/ mysql console, it's already in that folder. the commands are the same, but you have to first log in as root or specific user, if already setup, and perform command from there, for example
mysqldump -u root -p dbname > backupdb.sql
or
mysqldump -u username -ppassword dbname > backupdb.sql

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: Dicky (---.wltonh.dsl.dynamic.tds.net)
Date: September 29, 2010 04:44AM

CLI = Command Line Interface which is done with the DOS command window.

I believe the MySQL console in WAMP is only for running queries.

There are several ways to open the Command Window depending on your operating system:
Start > Programs > Accessories > Command Prompt
or
Start > Run. Enter cmd
or
Start > Search. Enter cmd

At the DOS prompt, enter
cd c:\wamp\bin\mysql\mysql5.1.40\bin
The path will vary depending on your installed MySQL version.

At the DOS prompt enter:
mysqldump -udatabase_username -ppassword database_name > filename.sql
For options you can use on the command line, see mysqldump

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: macrunning (---.hsd1.wa.comcast.net)
Date: October 01, 2010 12:19AM

Thanks Dicky, that worked. I typically write it like this:
mysqldump --opt --user=root --result-file=C:/myfilepath/filename.sql database_name --compatible=mysql40

Of course that does not work on this set up! So how do I get your method to write the filename.sql to a different directory?

Also would you happen to know why the method in which I am use to running the mysqldump statement does not work on the WAMP set up?

I have a couple of computers where I had set up the mysql,php,apache stuff on my own and this statement method always worked on those other computers. Of course this wasn't something I did every time so when I came across the WAMP I figured it would be much easier to set up on my new netbook, than my previous installation methods. Anyway just trying to understand and figure out. Thanks for everyones help.

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: October 01, 2010 12:22AM

mysqldumper smiling smiley

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: Dicky (---.wltonh.dsl.dynamic.tds.net)
Date: October 03, 2010 06:04AM

or MySQL Administrator winking smiley

Quote
macrunning
So how do I get your method to write the filename.sql to a different directory?
Do it like you have always done, C:/myfilepath/filename.sql

I am not sure why the methods are different. Different flavors have different ways of doing things, I guess.

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: macrunning (---.hsd1.wa.comcast.net)
Date: October 06, 2010 09:03PM

THanks Dicky, One last thing. Would you happen to know how (the statement I would use in the command line) I can export the sql statement as a .gzipped file? Do I need an add on or is this built into the program?

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: Dicky (---.wltonh.dsl.dynamic.tds.net)
Date: October 07, 2010 02:01AM

I have not attempted to pipe mysqldump through gzip. I usually create the backup file and then use 7-Zip to compress to a .gz compressed file.

I did find this on the mysqldump page I linked you to:
Quote

(sic)Apparently this works on Windows

%mysqldir%\bin\mysqldump -B %dbname% -u %dbuser% | gzip> %bkupdir%\dbBkup_%dbname%_%yy%%mm%%dd%.sql.gz

Of course,you need gnu gzip in your path or directory./

Have fun!

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: macrunning (---.hsd1.wa.comcast.net)
Date: October 10, 2010 08:39PM

Hi Dicky, so I tried to dump the file to the directory I want as you mentioned but I am getting the following message "mysqldump: couldn't find table: and"

My file path I want to write to is C:\Documents and Settings\Desktop\dumps

Any ideas?

Options: ReplyQuote
Re: how do i run mysqldump?
Posted by: Dicky (---.wltonh.dsl.dynamic.tds.net)
Date: October 10, 2010 08:52PM

Try writing to a directory that does not have spaces in the name.

Options: ReplyQuote


Sorry, only registered users may post in this forum.