Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to completely uninstall mysql in Ubuntu

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article shows you how to completely uninstall mysql in Ubuntu, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

1. Delete mysql

1 sudo apt-get autoremove-- purge mysql-server-5.0

2 sudo apt-get remove mysql-server

3 sudo apt-get autoremove mysql-server

4 sudo apt-get remove mysql-common (very important)

In fact, some of the above are superfluous, so the suggestions should be carried out in sequence.

Clean up residual data

Dpkg-l | grep ^ rc | awk'{print $2}'| sudo xargs dpkg-P

2. Install mysql

1 sudo apt-get install mysql-server

2 sudo apt-get install mysql-client

3 sudo apt-get install 5-(install php5-mysql to connect php and mysql)

Once the installation is complete, the MySQL server should start automatically. You can run the following command from the terminal prompt to check if the MySQL server is running:

1 sudo netstat-tap | grep mysql

When you run the command, you can see lines similar to the following:

Tcp 0 0 localhost.localdomain:mysql *: * LISTEN-

If the server is not functioning properly, you can start it with the following command:

1 sudo / etc / init.d / mysql restart

3. Enter mysql

$mysql-uroot-p administrator password

Configure the administrator password for MySQL:

1 sudo mysqladmin-u root password newpassword

The above is how to completely uninstall mysql in Ubuntu. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report