Does anybody know how to shut down mySQL on Linux and keep it from starting up on logon??
stopping is easy...
open a console
login as root or start the command with sudo.
then go to the /etc/init.d directory
"cd /etc/init.d"
display the contents of the directory...
if you can find mysql (in ubuntu it is mysql)
type "mysql stop" -> to stop the service...
type "mysql start" -> to start the service...
type "mysql restart" -> to restart the service...
on some distros the command will be
"mysqld start" ..... and so on.
Don't get me wrong as I believe if and when I help someone I also help myself whereby whatever someone learns I also learn.
But I will also accept credits or reps if you really want to part with it.
if you are using ubuntu
Go to the folder /etc/rc2.d
then do an ls there
if you find anything with a mysql rename the symlink from
S19mysql to K19mysql
the 19 may vary so you would want to do an ls first
renaming is done by mv
e.g.
mv S19mysql K19mysql
Edit:
If you are using other linux distros then my advice is for you to locate the folder controlling the runlevel2 daemons. and disable it from there.
Last edited by dickey; 11-19-2008 at 07:51 PM. Reason: Automerged Doublepost
Don't get me wrong as I believe if and when I help someone I also help myself whereby whatever someone learns I also learn.
But I will also accept credits or reps if you really want to part with it.
are you running ubuntu?
if so browse all the other rcX.d folder and check whether your mysql is run there. I had around 3 files in rc2.d folder.
1. S19mysql
2. S17mysql-ndb
3. S18mysql-ndb-mgm
all of which are symlinks...
rcX.d folders contains most start up daemons and are on different run levels if you know what run-level your mysql is starting up with. then go to the corresponding rcN.d folder. I hope this helps. Although I would do the same as Dickey when I want to temporarily disable mysql. If you are running a different flavor of linux can you post here what dist. you are using?
Well, if you are using ubuntu:
System -> Administration -> Services
should list one or more mysql entries, just untick them