Problems and Solutions for installing MySQL in Ubuntu

Source: Internet
Author: User
Problem description: Ubuntu after installing Mysql such a prompt is set up mysql-server-5.5 (5.5.27-0ubuntu2 )... start: Jobfailedtostartinvoke-rc.d: initscriptmysql, action "start" failed. dpkg: errorprocessingmysql-server-5.5 (--

Problem description:

This prompt appears after Mysql is installed in Ubuntu.

Setting mysql-server-5.5 (5.5.27-0ubuntu2)... start: Job failed to startinvoke-rc.d: initscript mysql,

Action "start" failed. dpkg: error processing mysql-server-5.5 (-- configure): the sub-process has post-installation script installed and Returns error Code 1 dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on the mysql-server-5.5; however: the package mysql-server-5.5 is not configured yet. Dpkg: error processing mysql-server (-- configure): dependency problem-not configured because the error message indicates that this is an error caused by the previous problem and has not been written to the apport report.

An error occurred while processing: mysql-server-5.5 mysql-serverE: Sub-process/usr/bin/dpkg returned an error code (1)

This problem happened to me before, and has been bothering me for a while. However, after my research, I slowly explored and consulted relevant materials, and finally solved the problem smoothly, now I will share with you the solution to this problem to let more people know.

Before deleting mysql, delete/var/lib/mysql and/etc/mysql.

Enter the following commands:

Sudo rm/var/lib/mysql/-Rsudo rm/etc/mysql/-R

Sudo apt-get autoremove mysql * -- purge

Sudo apt-get remove apparmor

Sudo apt-get install mysql-server mysql-common

Input commands from top to bottom and press Enter. After these commands are executed, the Mysql database will be reinstalled, by re-installing the password, it means your problem has been solved!

Recommended reading:

Install the LAMP \ Vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04Http://www.linuxidc.com/Linux/2013-06/86250.htm

Compile and install LAMP (Apache 2.2.44 + MySQL 5.6.10 + PHP 5.4.12) http://www.linuxidc.com/Linux/2013-03/80333p3.htm in CentOS 5.9

Source code construction of Web Server Architecture in RedHat 5.4 LAMP environment and application PHPWind http://www.linuxidc.com/Linux/2012-10/72484p2.htm

LAMP source environment to build WEB Server Linux + Apache + MySQL + PHP http://www.linuxidc.com/Linux/2013-05/84882.htm

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2014-04/100752.htm

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.