Problems with reinstalling after MySQL uninstall under Ubuntu

Source: Internet
Author: User

Uninstall MySQL Error resolution Method 1
Dpkg:error processing Mysql-server (--configure): Dependency problems-leaving unconfigured Start:job failed to start
Invoke-rc.d:initscript MySQL, action "start" failed. Dpkg:error processing mysql-server-5.5 (--configure):
Subprocess installed post-installation script returned error exit status 1 dpkg:dependency problems prevent configuration of Mysql-server:mysql-server depends on mysql-server-5.5; However:package mysql-server-5.5 is not configured yet. Dpkg:error processing Mysql-server (--configure): Dependency problems-leaving unconfigured
No Apport report written because the error message indicates it a followup error from a previous failure.
Errors were encountered while processing:
mysql-server-5.5 Mysql-server
E:sub-process/usr/bin/dpkg returned an error code (1)
Workaround:
Remove MySQL before deleting/var/lib/mysql and/etc/mysql.
sudo rm/var/lib/mysql/-r sudo rm/etc/mysql/-r
sudo apt-get autoremove mysql*--purge sudo apt-get remove AppArmor
sudo apt-get install mysql-server Mysql-common
UBUNTU completely remove MySQL then reload MySQL
Delete MySQL

sudo apt-get autoremove--purge mysql-server-core-5.5
sudo apt-get remove Mysql-server
sudo apt-get autoremove mysql-server
sudo apt-get remove Mysql-common//This is very important in fact some of them are superfluous.
Clean up residual data
sudo dpkg-l |grep ^rc|awk ' {print $} ' |sudo Xargs dpkg-p

Binary installation can refer to http://dev.mysql.com/doc/refman/5.5/en/binary-installation.html

Shell>groupadd mysqlShell>useradd -r -g mysql mysqlShell>cd /usr/localShell>tar zxvf /path/to/mysql-VERSION-OS.tar.gzShell>ln -s full-path-to-mysql-VERSION-OS mysqlShell>cd mysqlShell> sudochown -R mysql .Shell> sudochgrp -R mysql .Shell> sudoscripts/mysql_install_db --user=mysqlShell> sudochown -R root .Shell> sudochown -R mysql data# Next command is Optionalshell>sudocp support-files/my-default.cnf /etc/my.cnfShell>bin/mysqld_safe --user=mysql &# Next command is optionalshell> sudocp support-files/mysql.server /etc/init.d/mysql.serverShell> sudo/etc/init.d/mysql.server start

Problems with reinstalling after MySQL uninstall under Ubuntu

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.