programing

MySQL Ubuntu 14.04 LTS 완전히 제거

codeshow 2023. 8. 30. 22:20
반응형

MySQL Ubuntu 14.04 LTS 완전히 제거

Ubuntu 서버의 MySQL이 어떻게든 엉망이 되어 수정할 수 없습니다.저는 모든 조합을 시도해 보았습니다.apt-get remove --purge mysql-server,apt-get autoremove,apt-get purge몇 시간 동안 검색했지만 아무것도 없었습니다.

저는 말 그대로 포기했습니다.재설치를 시도할 때마다 오류가 발생합니다.이제 됐습니다.서버에서 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

이 후 다시 설치하는 데 문제가 있는 경우 다음에서 Myslog 파일을 제거해 보십시오.

sudo rm -rf /var/lib/mysql

MySQL 업데이트 후 Ubuntu 14.04 LTS에서도 비슷한 문제가 발생했습니다.

오류가 발생하기 시작했습니다. "치명적 오류:권한 테이블을 열고 잠글 수 없습니다./var/log/mysql/error.log의 'user' 파일 형식이 잘못되었습니다.

MySQL을 시작할 수 없습니다.

/var/lib/mysql/mysql 디렉토리를 제거하여 해결했습니다.

sudo rm -rf /var/lib/mysql/mysql

이렇게 하면 다른 DB 관련 파일이 제자리에 남아 mysql 관련 파일만 제거됩니다.

실행 후:

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

그런 다음 mysql을 다시 설치하는 중:

sudo apt-get install mysql-server

완벽하게 작동했습니다.

여전히 문제가 있는 사람들을 위한 다른 솔루션.Mysql을 다시 설치하려는 사람들을 도울 수 있기를 바랍니다.이것은 탐색 및 파괴 임무입니다.그러니 지치세요.루트를 가정할 때:

apt-get purge mysql*
apt-get purge dbconfig-common #the screen used for mysql password
find / -name *mysql*          #delete any traces of mysql
#insert apt-get cleanups, autoremove,updates etc.

원래 남은 무언가가 mysqlserver-5.5의 시작을 방해하고 있었습니다.이 명령들은 결국 스스로 문제를 해결했습니다.

다음 작업이 가능성:

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

apt를 사용하여 모든 MySQL 패키지를 제거하고 제거합니다.

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

MySQL 폴더 제거:

 $ rm -rf /etc/mysql

서버의 모든 MySQL 파일 삭제:

$ sudo find / -iname 'mysql*' -exec rm -rf {} \;

시스템에 더 이상 기본 MySQL 관련 파일이 포함되지 않아야 합니다.

sudo apt-get remove --message mysql*

대상 시스템에서 MySQL 패키지를 완전히 제거합니다.

sudo apt-get purge mysql*

mysql 관련 구성 파일을 모두 제거합니다.

sudo apt-get 자동 제거

자동 제거 명령을 사용하여 사용되지 않는 종속성을 정리합니다.

sudo apt-get autoclean

대상 시스템의 모든 로컬 리포지토리를 지웁니다.

sudo apt-get remove dbconfig-dll

dbconfig-mysql에 대한 로컬/config 파일도 삭제하려는 경우 이 작업이 가능합니다.

이것이 절 구해준 것입니다.보아하니 디팩커가 잘못된 tmp 폴더에 물건을 넣으려고 하는 것 같습니다.

https://askubuntu.com/a/248860

/etc/my.cnf 파일을 제거하고 설치를 다시 시도하십시오. 정확히 같은 문제에 대해 작동했습니다. :-)

mysql 제거:

sudo apt -y purge mysql*
sudo apt -y autoremove
sudo rm -rf /etc/mysql
sudo rm -rf /var/lib/mysql*

인스턴스 다시 시작:

sudo shutdown -r now

저도 방금 같은 문제가 있었습니다.알고 보니 mysql은 이미 설치되어 작동하고 있었습니다.어떻게 확인해야 할지 몰랐을 뿐입니다.

$ ps aux | grep mysql

mysql이 이미 실행 중인지 여부가 표시됩니다.이 경우 다음과 같은 것을 반환해야 합니다.

mysql    24294  0.1  1.3 550012 52784 ?        Ssl  15:16   0:06        /usr/sbin/mysqld
gwang    27451  0.0  0.0  15940   924 pts/3    S+   16:34   0:00 grep --color=auto mysql

언급URL : https://stackoverflow.com/questions/25244606/completely-remove-mysql-ubuntu-14-04-lts

반응형