mysqldump commands do nothing

Problems with the Windows version of XAMPP, questions, comments, and anything related.

mysqldump commands do nothing

Postby xram12 » 21. June 2009 22:05

Hi,

I am a newby at shell commands and mysql but this is driving me crazy so I need some help

I connect to the local mysql server with a bat file like this

Code: Select all
@echo off

echo Starting MySQL command line...

mysql\bin\mysql.exe --user=root --password=xxxxxxx

pause


this works then I get the mysql> thing and when I type commands it works too

but when I try to access mysqldump like this

mysql> mysqldump --help

or any other command for mysqldump nothing happens, I just get this

mysql> mysqldump --help
->

no help appears, same as I try other commands for dumping or importing databases

so what am I doing wrong? ( and where does mysql dump actually dump the sql file? in the database directory itself?)

any help would be appreciated
xram12
 
Posts: 7
Joined: 21. June 2009 21:55

Re: mysqldump commands do nothing

Postby Wiedmann » 21. June 2009 23:09

but when I try to access mysqldump like this

mysql> mysqldump --help

"mysql.exe" is a programm and "mysqldump.exe" is also a program.
--> "mysqldump" is not a command inside the MySQL command line client "mysql.exe". You must start "mysqldump.exe" like "mysql.exe" from a Windows command shell (cmd.exe) (or a batchfile).
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: mysqldump commands do nothing

Postby xram12 » 22. June 2009 18:29

I suspected something like that so I changed the bat file from msql.exe to mysqldump.exe

I did get a command line window,

it says this:
Starting MySQL command line...
Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases [OPTIONS]
For more options, use mysqldump --help
Press any key to continue . . .

when I try to type the window disappears, any idea why that is?
xram12
 
Posts: 7
Joined: 21. June 2009 21:55

Re: mysqldump commands do nothing

Postby Wiedmann » 22. June 2009 18:43

any idea why that is?

"mysqldump.exe" don't have it's own shell like "mysql.exe".

Whatever "mysqldump.exe" should do for you, you must configure with parameters:
--> see the MySQL documentation about mysqldump.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: mysqldump commands do nothing

Postby xram12 » 22. June 2009 19:36

its confusing when they talk about it as if it is a shell window, I get it now you give the commands from the the same run thing you get the command window from , ( i wonder if anybody can use the help when it rushes by like that :D ), now last question where does it dump the file? is there a special place for it or can you designate a specific place?
xram12
 
Posts: 7
Joined: 21. June 2009 21:55

Re: mysqldump commands do nothing

Postby Wiedmann » 22. June 2009 21:25

its confusing when they talk about it as if it is a shell window,... ( i wonder if anybody can use the help when it rushes by like that

Well, mysql.exe, mysqldump.exe are shell (command line) tools and not designed to start with a double click. Normally you first open a Windows command shell, and then you execute these programs (by typing with your keyboard).

is there a special place for it or can you designate a specific place?

If you don't specify an other, it's the current working directory.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: mysqldump commands do nothing

Postby xram12 » 23. June 2009 17:49

I figured it out now (really somebody on a other forum did), its a vista/windows problem, when you type a command for mysqldump in the command line , it isn't executed because it isn't run with administrator privileges, ( despite the fact the window says it is )so you have to make a .bat file with the code in it like this for dumping:

Code: Select all
C:/xampp/mysql/bin/mysqldump -u root -ppassowrd database_name > c:/xampp/filename.sql


and this for restoring:

Code: Select all
C:/xampp/mysql/bin/mysql -u root -ppassowrd database_name < c:/xampp/filename.sql


save the file as dump.bat or restore.bat and run it as administrator (right click on the file,its in the menu) , then it works and dumps the database or restores it.

when you run it the code from the command line , nothing happens, at least not on windows and /or vista.

Thank you for help.
xram12
 
Posts: 7
Joined: 21. June 2009 21:55

Re: mysqldump commands do nothing

Postby Wiedmann » 23. June 2009 18:17

when you run it the code from the command line , nothing happens, at least not on windows and /or vista.

I have no problems using these tools in vista...

(mysqldump does not need Administrators privileges. Maybe your user does not have rights in the target directory you have specified for the dump.)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: mysqldump commands do nothing

Postby xram12 » 23. June 2009 18:25

uac is of and I installed xxamp myself on c and I can copy and move files there.

and I am a administrator on this computer.

but when I use mysqldump from the commandline it doesn't make the file, I have no idea why it doesn't work.

I can't see what the dos window says

it disappears to quickly
xram12
 
Posts: 7
Joined: 21. June 2009 21:55

Re: mysqldump commands do nothing

Postby Wiedmann » 23. June 2009 19:36

I can't see what the dos window says

it disappears to quickly

How do you open the DOS Windows?
--> Maybe you want read the Windows help about using the Windows command shell.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: mysqldump commands do nothing

Postby xram12 » 24. June 2009 18:04

by typing the mysql dump command in the command line, a dos window flashes and no dumpfile is created.
xram12
 
Posts: 7
Joined: 21. June 2009 21:55

Re: mysqldump commands do nothing

Postby Wiedmann » 24. June 2009 18:49

by typing the mysql dump command in the command line

Which command line?

I guess you have never read the documentation for your operating system?
http://windowshelp.microsoft.com/Windows/en-US/help/c2a67131-37e7-45cf-af74-f469967bf76f1033.mspx


BTW:
a dos window flashes and no dumpfile is created.

I guess there is an error message, because you are using wrong slashes in your command example above (Windows is working with backslashs).
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: mysqldump commands do nothing

Postby xram12 » 08. July 2009 17:32

I am sure I tried both forward and backward slashes, I dunno but at least the bat thing works,

I have one more unrelated question which is too small too start another topic for

if you run xampp on a laptop behind a router with other laptops connected to the router, and the router has a firewall is it safe?

is there no way other people can access the xampp installation even if they know my i.p.?

on the mac forum they said it is but I just want to be sure.
xram12
 
Posts: 7
Joined: 21. June 2009 21:55


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 158 guests