Здравствуйте! Была задача поднять почтовый сервер с postfix, postfixadmin и roundcube. Перечитал кучу различных инструкций разной степени свежести. В результате на стадии настройки mysql (был установлен ранее, но не сконфигурирован) команда mysql -u root mysql выдаёт ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2). Файл для этого сокета отсутствует. Где-то в логах видел что пакеты для mysql были установлены в неправильном порядке. Вывод по установленным пакетам и статусу:
sudo dpkg -l | grep mysql
ii dbconfig-mysql 2.0.21 all dbconfig-common MySQL/MariaDB support
ii mysql-apt-config 0.8.22-1 all Auto configuration for MySQL APT Repo.
ii mysql-common 8.0.31-1debian11 amd64 Common files shared between packages
rc mysql-server-8.0 8.0.30-0ubuntu0.22.04.1 amd64 MySQL database server binaries and system database setup
ii php-mariadb-mysql-kbs 1.2.12-1 all Knowledge base about MariaDB and MySQL server variables
ii php-mysql 2:8.1+92ubuntu1 all MySQL module for PHP [default]
ii php8.1-mysql
sudo dpkg -l | grep mariadb
ii libmariadb3:amd64 1:10.6.11-0ubuntu0.22.04.1 amd64 MariaDB database client library
ii mariadb-client-10.6 1:10.6.11-0ubuntu0.22.04.1 amd64 MariaDB database client binaries
ii mariadb-client-core-10.6 1:10.6.11-0ubuntu0.22.04.1 amd64 MariaDB database core client binaries
ii mariadb-common 1:10.6.11-0ubuntu0.22.04.1 all MariaDB common configuration files
ii php-mariadb-mysql-kbs
sudo systemctl status mysql
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql; generated)
Active: active (exited) since Tue 2023-01-10 10:11:31 MSK; 21min ago
Docs: man:systemd-sysv-generator(8)
Process: 3897 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
CPU: 2ms
янв 10 10:11:31 lkom systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
янв 10 10:11:31 lkom systemd[1]: Started LSB: Start and stop the mysql database server daemon.
Т.е. вроде как получается что установлен mysql и частично mariadb... Что-то нужно снести, или дело в чём-то ином? Копаюсь уже несколько дней. Сроки горят. Буду крайне признателен за помощь.
Пользователь добавил сообщение 11 Января 2023, 05:40:51:
За отсутствием ответов и времени решил снести всё связанное с mariadb и mysql, включая файлы конфигурации, потом начисто переставить mysql. Гуглил как это правильно сделать. Статьи противоречивые, в основном старые. Для начала непонятно в каком порядке сносить пакеты. Кроме того, решившись с чего-то начать, получил следующее: sudo apt-get purge mariadb-client-core-10.6
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mysql-common : Conflicts: mysql-client-8.0 but 8.0.31-0ubuntu0.22.04.1 is to be installed
Conflicts: mysql-client-core-8.0 but 8.0.31-0ubuntu0.22.04.1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
sudo dpkg -l | grep 8.0.31-0ubuntu0.22.04.1
sudo apt-get install 8.0.31-0ubuntu0.22.04.1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package 8.0.31-0ubuntu0.22.04.1
E: Couldn't find any package by glob '8.0.31-0ubuntu0.22.04.1'
E: Couldn't find any package by regex '8.0.31-0ubuntu0.22.04.1'
Попробовал по другому:
sudo apt purge mariadb-client-10.6 mariadb-client-core-10.6 mariadb-common
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
dbconfig-mysql : Depends: default-mysql-client but it is not going to be installed or
virtual-mysql-client
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Может кто поможет корректно снести?
Короче, сам разобрался.