Решение проблем MySQL
При обновлении новой версии может происходить ошибка типа такой:
text
update-alternatives: error: no alternatives for my.cnf
dpkg: error processing package mysql-common (--purge):
subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
mysql-common
или такой:
text
update-alternatives: error: /var/lib/dpkg/alternatives/my.cnf corrupt: invalid status
dpkg: error processing package mysql-common (--purge):
subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
mysql-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
или такой:
text
update-alternatives: error: unable to read link '/etc/alternatives/my.cnf': Invalid argument
dpkg: error processing package mysql-common (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
mysql-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Решается командой:
sudo dpkg -P --force-all mysql-common
Если не помогло, то так:
bash
sudo rm /etc/alternatives/my.cnf
sudo ln -s /etc/mysql/mysql.cnf /etc/alternatives/my.cnf
Павел Гвоздь