How to remove MySQL from Ubuntu and reinstall it

How to remove MySQL from Ubuntu and reinstall it

First delete mysql:

sudo apt-get remove mysql-*

Then clean up the remaining data

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

A dialog box will pop up, just select yes.

Then install mysql

sudo apt-get install mysql-client mysql-server

You will be prompted to set a root password during installation. If you do not clean up residual data during uninstallation, you will not be prompted to set a root password.

Check if mysql is running

sudo service mysql status

Generally, it will run automatically after the installation is complete.

If it is not running you can

sudo service mysql start

Summarize

The above is the method I introduced to you to remove MySQL from Ubuntu and reinstall it. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Ubuntu18.04 installation mysql8.0.11 graphic tutorial
  • How to install MySQL on Ubuntu 18.04 (linux)
  • Ubuntu 18.04 MySQL 8.0 installation and configuration method graphic tutorial
  • Ubuntu Server 16.04 MySQL 8.0 installation and configuration graphic tutorial
  • Detailed explanation of installing and completely uninstalling mysql with apt-get under Ubuntu
  • How to install mysql5.6 in docker under ubuntu
  • MySQL and MySQL Workbench Installation Tutorial under Ubuntu
  • Solve the problem of ERROR 1045 (28000): Access denied for user ''root''@''localhost'' when logging in after installing MySQL 5.7.17 on Ubuntu 16.04
  • Tutorial on installing MySQL 5.7 on Ubuntu 16.04
  • Ubuntu 16.04.1 MySQL installation and uninstallation graphic tutorial
  • Solution to the error "libpng12-0 package not installed" when installing mysql workbench in Ubuntu 16.10

<<:  Building a KVM virtualization platform on CentOS7 (three ways)

>>:  Summary of the use of three for loop statements in JavaScript (for, for...in, for...of)

Recommend

JavaScript implements AI tic-tac-toe game through the maximum and minimum algorithm

Without further ado, let’s run the screenshot dir...

How to perfectly implement the grid layout with intervals on the page

Typical layout examples As shown in the above pic...

How to install mysql on centos and set up remote access

1. Download the mysql repo source $ wget http://r...

The latest mysql-5.7.21 installation and configuration method

1. Unzip the downloaded MySQL compressed package ...

Upgrading Windows Server 2008R2 File Server to Windows Server 2016

The user organization has two Windows Server 2008...

MySQL 8.0.20 installation tutorial and detailed tutorial on installation issues

Original address: https://blog.csdn.net/m0_465798...

Detailed explanation of how to use several timers in CocosCreator

1. setTimeOut Print abc after 3 seconds. Execute ...

Explanation of the problem that JavaScript strict mode does not support octal

Regarding the issue that JavaScript strict mode d...

JS removeAttribute() method to delete an attribute of an element

In JavaScript, use the removeAttribute() method o...

One minute to experience the smoothness of html+vue+element-ui

Technology Fan html web page, you must know vue f...

jQuery Ajax chatbot implementation case study

Chatbots can save a lot of manual work and can be...

Vue implements time countdown function

This article example shares the specific code of ...