Page 1 of 1

MySQL shutdown

PostPosted: 20. May 2004 15:05
by scranmer
Sorry I have tried to translate the posts to english :( but have not quite found what I need.

I have started using XAMPP but have now changed MSQL root password I think (from translating http://community.apachefriends.org/f/viewtopic.php?t=5456&highlight=mysql+stop) that this means now the mysql_shutdown.bat will not work.

Is this correct and is there anyway of fixing this :?:

Thanks in advance for your help.

Simon.

PostPosted: 20. May 2004 16:07
by Wiedmann
You can edit the file:
"\xampp\mysql_stop.bat"
Code: Select all
@echo off
echo Mysql shutdowm ...
mysql\bin\mysqladmin shutdown

edit line 3 (change "root" and "rootpassword" to the correct values for your system):
Code: Select all
mysql\bin\mysqladmin --user=root --password=rootpassword shutdown

Now you can stop MySQL with this batchfile.

If you have installed MySQL as service, you can simply use a "net stop MySQL" at the command line.

PostPosted: 21. May 2004 10:29
by scranmer
Vielen Dank,

For you quick response all now works fine. Found this very usefull for the lazy people (me). 1 startup and 1 stop icon to press

add "exit" to the bottom of

apache_start.bat
Code: Select all
@echo off
echo Diese Eingabeforderung nicht waehrend des Running beenden
echo Bitte erst bei einem gewollten Shutdown schliessen
echo Please close this command only for Shutdown
echo Apache 2 is starting ...
apache\bin\apache.exe


exit


mysql_start.bat
Code: Select all
@echo off
echo Diese Eingabeforderung nicht waehrend des Running beenden
echo Please dont close Window while MySQL is running
echo MySQL is trying to start
echo Please wait  ...
echo MySQL is starting with mysql\bin\my.cnf (console)
mysql\bin\mysqld --defaults-file=mysql\bin\my.cnf --standalone

exit



then you use the following

all_start.bat
Code: Select all
start apache_start.bat
sleep 2
start mysql_start.bat
sleep 2
start http://localhost/phpmyadmin/index.php



all_stop.bat
Code: Select all
@echo off

echo Mysql shutdowm ...
mysql\bin\mysqladmin --user=root --password=S3QU3NC3 shutdown


sleep 2

echo Apache shutdowm ...
apache\bin\kill.exe /f apache.exe
if not exist apache\logs\httpd.pid GOTO exit
del apache\logs\httpd.pid

:exit


HTH

Si.

PS If I remember from school (many years ago) :roll:
"Ausgezeichnetes Projekt danke"