zoukankan      html  css  js  c++  java
  • Ubuntu 下 mysql 卸载后重安装时遇到的问题

    卸载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> groupadd mysql
    shell> useradd -r -g mysql mysql
    shell> cd /usr/local
    shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
    shell> ln -s full-path-to-mysql-VERSION-OS mysql
    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
    
  • 相关阅读:
    野指针防范
    Linuxgate.so.1的含义[ZZ]
    malloc hook
    用PDF补丁丁一分钟批量删除PDF文档的第一页和最后一页
    PDF 补丁丁 0.4 测试版已经上线
    生活小百科:实用的生活保健小窍门,60则!....
    Pascal Analyzer 4 代码分析使用简要说明
    大数法则
    make: *** No rule to make target `all'. Stop.
    界面动态配置:持久化反持久化
  • 原文地址:https://www.cnblogs.com/wayne173/p/3933956.html
Copyright © 2011-2022 走看看