Ubuntu Reload MySQL Error resolution

Source: Internet
Author: User

The new server, first installed on Ubuntu mariadb, and later due to a lot of permissions issues, decided to install MySQL, during the uninstallation process due to not uninstalled cleanly, resulting in a lot of problems in MySQL reload process.

 reading Package lists ... Donebuilding dependency treereading state information ... Donemysql -server is already the newest version (5.7 . 21  -0ubuntu0. 16.04 . 1    " apt-get-f Install   "  to correct these:the following packages Have unmet dependencies:mysql -server:depends:mysql-server-5.7   But it isn't going to be installede:unmet dependencies. Try   " apt-get-f install   " with no packages (or specify a solution). 

By reading the error message, it is mainly because of the dependency problem, the main idea is to rebuild the dependency, and then clean Uninstall, and finally reinstall.

First, update the system

sudo apt-get update

Then, fix the installation error, you will be prompted to enter the MySQL user name password

sudo Install

Then, retrieve the MySQL installation package and remove the retrieved dependency package, then delete the/var/lib/mysql, and finally reload MySQL.

Let me show you the solution I have retrieved:

We Excute The following commands to solve the above problem:     1 sudo grep MySQL     2 . Remove the packages shown above by executing the command       sudo1>    3. delete/var/lib/MySQL    4install MySQL again. It should solve your problem.

The packages in the second step is as follows:

The last is to update the system and reload MySQL.

sudo apt-get updatesudo apt-get install Mysql-server mysql-client

Summarize:

The overall idea is to rebuild dependencies, clean uninstall, and update the installation. We hope to be inspired and helpful to the small partners who are overwhelmed with the same problems. Thank you.

Ubuntu Reload MySQL Error resolution

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.