Ubuntu 下 mysql 卸载后重安装时遇到的问题
2014-08-25 00:26
603 查看
卸载mysql报错解决方法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 its 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)
解决方法:
删除mysql前 先删除一下 /var/lib/mysql 还有 /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 彻底删除 MYSQL 然后重装 MYSQL
删除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 //这个很重要 上面的其实有一些是多余的。
清理残留数据
sudo dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
二进制安装 可以参考 http://dev.mysql.com/doc/refman/5.5/en/binary-installation.html
shell>
shell>
shell>
shell>
shell>
shell> sudo
shell> sudo
shell> sudo
shell> sudo
shell> sudo
# Next command is optional
shell>sudo
shell>
# Next command is optional
shell> sudo
shell> sudo
[/code]
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 its 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)
解决方法:
删除mysql前 先删除一下 /var/lib/mysql 还有 /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 彻底删除 MYSQL 然后重装 MYSQL
删除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 //这个很重要 上面的其实有一些是多余的。
清理残留数据
sudo dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
二进制安装 可以参考 http://dev.mysql.com/doc/refman/5.5/en/binary-installation.html
shell> [code]groupadd mysql
shell>
useradd -r -g mysql mysql
shell>
cd /usr/local
shell>
tar zxvf/path/to/mysql-VERSION-OS.tar.gz
shell>
ln -sfull-path-to-mysql-VERSION-OSmysql
shell>
cd mysql
shell> sudo
chown -R mysql .
shell> sudo
chgrp -R mysql .
shell> sudo
scripts/mysql_install_db --user=mysql
shell> sudo
chown -R root .
shell> sudo
chown -R mysql data
# Next command is optional
shell>sudo
cp support-files/my-default.cnf /etc/my.cnf
shell>
bin/mysqld_safe --user=mysql &
# Next command is optional
shell> sudo
cp support-files/mysql.server /etc/init.d/mysql.server
shell> sudo
/etc/init.d/mysql.server start
[/code]
相关文章推荐
- Linux Ubuntu安装MySql 遇到的问题及解决方案
- Win8.1 与ubuntu14.04双系统安装(制作系统启动盘安装)与卸载及安装卸载遇到的问题
- 安装MYSQL遇到的问题后来无意发现是卸载的时候没有卸载完全导致,下面给出完整的卸载MySQL 5.1的卸载方法: 1、控制面板里的增加删除程序内进行删除 2、删除MySQL文件夹下的
- ubuntu下安装使用mysql遇到的问题
- linux下关于yum安装mysql卸载后遇到问题
- Ubuntu上安装MySql过程,以及遇到的一些问题
- Ubuntu安装MySQL及遇到的问题解决方案 xwj
- 阿里云ECS(ubuntu16.04)安装mysql遇到的一些问题
- 在ubuntu14.04上卸载mysql5.6重装5.5遇到的小问题
- ubuntu下安装qt的mysql驱动遇到的问题
- ubuntu下安装qt 的mysql 驱动遇到的问题
- Mysql安装中遇到的问题(针对的是Ubuntu或者Debian系统的解决措施)
- Ubuntu Server9 + Tomcat + mysql + Jdk 安装后遇到的一些常见问题
- Ubuntu安装MySQL及遇到的问题解决方案
- Ubuntu 16.04安装MySQL及遇到的问题解决方案
- Ubuntu下彻底卸载mysql、安装mysql、及MySQLdb模块 分类: ubuntu 问题总结 database 2014-01-23 13:49 2560人阅读 评论(0) 收藏
- chromebook下ubuntu 安装mysql遇到的问题
- SUSE Linux Ubuntu 下安装mysql遇到的问题一。
- ubuntu安装卸载遇到的诸多问题
- ubuntu16.04下安装MySQL-pthon,遇到:EnvironmentError: mysql_config not found问题