Удаление MySQL

Discussion in 'Безопасность и Анонимность' started by *Van*, 21 Jun 2006.

  1. *Van*

    *Van* Elder - Старейшина

    Joined:
    14 Aug 2005
    Messages:
    365
    Likes Received:
    19
    Reputations:
    12
    Есть root-доступ на Linux 2.6.8-022. Задача: удалить стоящий на сервере mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i686).
    Как можно это сделать?
     
  2. nerezus

    nerezus Banned

    Joined:
    12 Aug 2004
    Messages:
    3,191
    Likes Received:
    729
    Reputations:
    266
    через менеджер пакетов?
     
  3. Deem3n®

    Deem3n® RTFMSDN

    Joined:
    19 Sep 2005
    Messages:
    378
    Likes Received:
    153
    Reputations:
    164
    Если mysql был установлен из rpmки:
    Code:
    rpm -qa | grep mysql
    Получишь что-то вроде такого
    Найдешь свой пакет и:
     
  4. *Van*

    *Van* Elder - Старейшина

    Joined:
    14 Aug 2005
    Messages:
    365
    Likes Received:
    19
    Reputations:
    12
    Делаю как Deem3n®:
    Code:
    rpm -qa | grep mysql
    Результат:

    Code:
    mysql-3.23.58-16.FC2.4.legacy
    mysql-devel-3.23.58-16.FC2.4.legacy
    mysql-server-3.23.58-16.FC2.4.legacy
    php-mysql-4.3.11-1.fc2.4.legacy.1.swsoft
    mysql_passwd-0.7-2.swsoft
    libdbi-dbd-mysql-0.6.5-8.1
    Дальше:
    Code:
    rpm -e mysql-3.23.58-16.FC2.4.legacy
    Результат:
    Code:
    error: Failed dependencies:
            libmysqlclient.so.10 is needed by (installed) perl-DBD-MySQL-2.9003-4
            libmysqlclient.so.10 is needed by (installed) libdbi-dbd-mysql-0.6.5-8.1
            libmysqlclient.so.10 is needed by (installed) mysql-server-3.23.58-16.FC2.4.legacy
            mysql = 3.23.58 is needed by (installed) mysql-devel-3.23.58-16.FC2.4.legacy
            mysql is needed by (installed) psa-prevztune-1.0-2.swsoft
            mysql = 3.23.58 is needed by (installed) mysql-server-3.23.58-16.FC2.4.legacy
            mysql is needed by (installed) mysql_passwd-0.7-2.swsoft
    Что не так?
     
  5. *Van*

    *Van* Elder - Старейшина

    Joined:
    14 Aug 2005
    Messages:
    365
    Likes Received:
    19
    Reputations:
    12
    У меня установлен менеджер пакетов yum, пробую:

    Code:
    yum remove mysql-3.23.58-16.FC2.4.legacy
    Выдаёт:
    Code:
    Gathering header information file(s) from server(s)
    Server: Red Hat Linux 2 - i386 - Base
    retrygrab() failed for:
      http://mirror.dulug.duke.edu/pub/yum-repository/redhat/2/i386/headers/header.info
      Executing failover method
    failover: out of servers to try
    Error getting file http://mirror.dulug.duke.edu/pub/yum-repository/redhat/2/i386/headers/header.info
    [Errno 4] IOError: HTTP Error 404: Not Found
     
  6. Deem3n®

    Deem3n® RTFMSDN

    Joined:
    19 Sep 2005
    Messages:
    378
    Likes Received:
    153
    Reputations:
    164
    Если во время удаления пакета выдает "Failed dependencies" надо сначала удалить зависимые пакеты. В твоем случае перед удалением пакета mysql-3.23.58-16.FC2.4.legacy надо удалить зависимости perl-DBD-MySQL-2.9003-4, libdbi-dbd-mysql-0.6.5-8.1, mysql-server-3.23.58-16.FC2.4.legacy, mysql-devel-3.23.58-16.FC2.4.legacy, psa-prevztune-1.0-2.swsoft, mysql-server-3.23.58-16.FC2.4.legacy, mysql_passwd-0.7-2.swsoft
    Выше было
    Code:
    rpm -qa | grep mysql
    замени на
    Code:
    rpm -qa | grep -i mysq