Link to home
Start Free TrialLog in
Avatar of ostraaten
ostraaten

asked on

How to remove MySQL daemon on Ubuntu Linux

I have XAMPP installed and wanted to install a MySQL client, I was surprised to find it is not part of XAMPP.

Accidentally I also installed mysql-server, so the command I used was
sudo apt-get install mysql-client mysql-server
I really want to do
sudo apt-get install mysql-client

Now I have a problem removing mysql-server. I need to remove because it is conflicting with XAMPP for example

laptop:~$ sudo /opt/lampp/lampp start
Starting XAMPP for Linux 1.7...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Another MySQL daemon is already running.
XAMPP: Starting ProFTPD...
XAMPP for Linux started.

I tried sudo apt-get remove mysql-server but as it turns out that doesn't remove the MySQL daemon. I then reinstalled sudo apt-get install mysql-server and issued the following command

sudo apt-get remove --purge mysql-server

After that command I was able to succesfully start XAMPP. The message that another daemon was gone and XAMPP, PHPMyAdmin etc was working.

The problem now is that when I restart Ubuntu the daemon is up again and XAMPP fails to start again. So as it turns out sudo apt-get remove --purge mysql-server is also not enough to remove mysql-server.

Is there a way to remove this Daemon short of reinstalling Ubuntu?


 
Avatar of http:// thevpn.guru
http:// thevpn.guru
Flag of Denmark image

apt-get remove mysql-server
SOLUTION
Avatar of http:// thevpn.guru
http:// thevpn.guru
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of rindi
rindi
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ostraaten
ostraaten

ASKER

Works for me, I changed my XAMPP startup to

sudo /etc/init.d/mysql stop && sudo /opt/lampp/lampp start
Yup I guess you've done what I've pointed you to. But instead of stopping the service properly using init.d scripts you've preferred to circumvent it :) IT is ok if it works for you but what will happen when the time pass and you forget this lil trick  you've done and when you ant to see eaht services are active you'll want to keep mysql active :) or if you install the new version of xampp and if it overwrites your script youll be where you have left today. This is why I'm suggesting you to do it properly :)

I wanted to mark it for at least future researchers of the same topic.

Take Care,
K.

 
The most polite thing is just not make mysql start on boot.

You can do it with this command:

sudo update-rc.d -f mysql remove