mysql - 完全删除 MySQL Ubuntu 14.04 LTS

标签 mysql ubuntu lts

我在我的 Ubuntu 服务器上弄乱了我的 MySQL 并且无法修复它。我已经尝试了 apt-get remove --purge mysql-serverapt-get autoremoveapt-get purge、Googled 的每一种组合几个小时,一无所获。

我真的放弃了。每次我尝试重新安装时都会出错。我受够了。我想删除我服务器上与 MySQL 关联的每个文件。

每次我尝试重新安装时都会收到此错误,这似乎很常见,但没有一个“修复”对我有用。我需要清理我的系统中的所有 MySQL。

Unable to set password for the MySQL "root" user                                                                                                        
An error occurred while setting the password for the MySQL administrative user. This may have happened because the account already has a password, or   
because of a communication problem with the MySQL server.                                                                                               
You should check the account's password after the package installation.                                                                                 
Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more information.

在我重新安装服务器之前,请有人给我一组命令来从我的系统中清除这个邪恶的数据库。

Setting up mysql-server-5.5 (5.5.38-0ubuntu0.14.04.1) ...
140811 10:56:44 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package 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 package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.  
Processing triggers for libc-bin (2.19-0ubuntu6.1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

我已经尝试了一切。每一个 mysql 文件都被删除了,它仍然无法正确安装。

最佳答案

从 Ubuntu 中完全删除 Mysql:

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean

在此之后,如果您在重新安装时遇到问题,请尝试删除以下 Mysql 文件:

sudo rm -rf /var/lib/mysql

希望这会有所帮助。

关于mysql - 完全删除 MySQL Ubuntu 14.04 LTS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25244606/

相关文章:

c++ - ubuntu命令获取C++程序中的所有功能

Ubuntu - Nginx - 极高的 IO 写入

ubuntu - 什么是 LTS(长期支持)?

haskell - 某个包是否因省略依赖项而从 Stackage LTS 中排除?

node.js - Node js V4.2.2 LTS 和 V5.0.0 Stable 有什么区别

php - MySQL 搜索运算符和 "LIKE"

c - 写一个小程序,困了,从命令行获取循环计数

Mysql RDS 具有 300 万条记录,不允许添加新列

python - 将 join 的两列合并为一列的结果

mysql - 如何在 MySql 中对 IP 地址进行排序,使 ipv4 位于 ipv6 地址之前?