How to remove MySQL completely with config and library files

With the command:

sudo apt-get remove --purge mysql\*

you can delete anything related to packages named mysql. Those commands is only valid on debian / debian based linux distributions (for eg. ubuntu).

You can list all mysql packages installed with:

sudo dpkg -l | grep -i mysql

For more cleanup for package cache you can:

sudo apt-get clean

Remember to:

sudo updatedb

Otherwise the “locate” command will display old data.

To install mysql again, use the following command:

sudo apt-get install libmysqlclient-dev mysql-client

This will install mysql client, libmysql and its headers files.

To install the server, run this one:

sudo apt-get install mysql-server
Advertisements

Share your thoughts with us!!!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s