我在我的 Ubuntu 服务器上弄乱了我的 MySQL 并且无法修复它。我已经尝试了 apt-get remove --purge mysql-server
、apt-get autoremove
、apt-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/