mysqldump/mysqladmin

mysqldump/mysqladmin

am 09.02.2005 16:14:05 von kc68

This is pretty basic, but despite successful use of mysql on Win98, I have
two questions for use on XP, which I've just started: mysql opens fully
with the icon; how do I do mysqldump (through the shell?) and how do I use
mysqladmin to close it down? Thanks.

Ken

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: mysqldump/mysqladmin

am 09.02.2005 16:19:18 von Daniel da Veiga

You can create a batch file (.bat) and use it as you do in 98...
The only difference is that in 98 the command line shell is named
"command.com" and in XP it is the "cmd.exe" file, oh, and some basic
syntax, no big deal.

:)


On Wed, 09 Feb 2005 10:14:05 -0500, kc68@cornell.edu wrote:
> This is pretty basic, but despite successful use of mysql on Win98, I have
> two questions for use on XP, which I've just started: mysql opens fully
> with the icon; how do I do mysqldump (through the shell?) and how do I use
> mysqladmin to close it down? Thanks.
>
> Ken
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=danieldaveiga@gmail.com
>
>


--
Daniel da Veiga
Computer Operator - RS - Brazil

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: mysqldump/mysqladmin

am 09.02.2005 17:02:37 von Daniel da Veiga

On Wed, 09 Feb 2005 10:29:29 -0500, kc68@cornell.edu wrote:
> Typing the command directly in the dos window, I would do mysql>quit in Win98 and be taken down a level (server not running?)

The server is still running when you do a quit, because you just
closed the client application, if your server wasn't running you
wouldn't be able to do a mysqldump.

> where I could execute mysqldump. In XP, when I type quit or exit, the dos-like window closes. Once I get this clear, I'll try the batch.

A batch application runs until all the commands are processed, you can
use the client in batch mode to execute the commands just like you
would do typing, your .bat file would contain something like this:

"C:\MySQL\bin\mysql.exe" --user="" -D "" -e ""

Then you could add just below the mysqldump command and run all.

mysqldump --

A great thing about this, you don't need to login because it already
does it with the user syntax (add the --password option to login using
password), don't need to select database (-D option) and you don't
need to quit the client because it does it when the command is
executed. You can type lots of commands, using ";" as separator.

That's it, hope that helps,

--
Daniel da Veiga
Computer Operator - RS - Brazil

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: mysqldump/mysqladmin

am 09.02.2005 19:13:08 von Daniel da Veiga

Ok, I'll try to explain,


On Wed, 09 Feb 2005 12:59:14 -0500, kc68@cornell.edu wrote:
> Thanks again, but I'm not a computer pro and what's obvious to others is
> not to me. Let me try to re-state the action part of what you said and
> ask that you tell me where I'm wrong.
>
> 1. Create a file in Notepad that contains the following text:
> c:\mysql\bin\mysql.exe
> mysqldump databasename filename > c:\folder\filename.sql

The first part is ok, you do create the file, and place it at the
right folder (if you don't wanna specify the folder at the line), so
far, so good. But the commands are wrong, you don't need to enter the
console, mysqldump.exe is a solo app and do not depend at the
mysql.exe, both connect to the server to do stuff. So, the right line
should only be:

mysqldump databasename filename > c:\folder\filename.sql

I'm not sure, but you should check the MySQL manual for the right
mysqldump syntax, I think yours is wrong.

> 2. Save this in c:\mysql\bin as batch.bat

You got it right.

> 3. At mysql> type
> source batch.bat

Ok, you really don't need the mysql.exe app to use mysqldump, all you
have to do is type "batch" at the prompt C:\MySQL\bin>, like this:

C:\MySQL\bin> batch

> (I haven't established a user other than root and the database is
> specified in the dump command. I don't know what -e is.)

-e executes the sql (use, select, insert, any sql command) and exits
the client (mysql).

> Also, to shut down the server, would I create a batch file that contains
> c:\mysql\bin\mysql.exe
> mysqladmin -u root shutdown

Again, you don't need the "mysql.exe" command, create a batch with:

mysqladmin -u root shutdown

And execute it like the other:

C:\MySQL\bin> shutdown

(assuming the filename is shutdown.bat)

--
Daniel da Veiga
Computer Operator - RS - Brazil

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: mysqldump/mysqladmin

am 18.02.2005 19:30:47 von Daniel da Veiga

Greetings,

On Fri, 18 Feb 2005 12:47:27 -0500, kc68@cornell.edu wrote:
> I still haven't been able to run mysqldump on XP, which we discussed
> (below). The basic problem is that I can't get to c:\mysql\bin and maybe
> that's because MySql installs deep in directories, i.e. in c:\Documents

It doesn't matter where the installation is, you can check the "icon"
you have on your desktop to located where it is, sorry, but if you
can't find it, you won't be able to deal with MySQL properly for lack
of knowledge of the OS.

> and Settings\My Name\Mysql-4.1.9 I start mysql by clicking on a desktop
> icon which starts both the server and the client. When I type quit, it

MySQL Server usually installs as a service in XP, that means when you
start your machine, you start MySQL, you don't need to command its
start, if you do, you should check the installation.

> exits everything, not just the client as happens on my Win98 machine,
> though I think the server keeps running here (XP). I've actually
> uninstalled MySql; should I reinstall MySql at c:\ ? Sorry, seems simple,
> but I can't get it to work.

Ok, lets go back to your problem, you MUST find the installation
directory, now, you're using XP, that means you could simply locate
the file "mysql.exe" using Start - Find - Files and Folders and you'll
have your installation directory. Another thing, if you build a .bat
file containing:

"/bin/mysqldump.exe" syntax> >
"/bin/mysqladmin.exe" syntax> shutdown

The only parts you have to change are the ones enclosed by <>, but not
the > between the syntax and the filename for the dump, because that
directs the output to that file. Include the quotes too.

If you can't follow this, I guess you should ask a experienced
computer operator or teacher for help. Not everything can be explained
by email and MySQL is a database server, not a simple thing to deal
with.

Best regards,

--
Daniel da Veiga
Computer Operator - RS - Brazil

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org