El problema:
Estoy intentando eliminar Mysql por completo porque me ha estado tirando errores que asumo que son por una mala configuracion en la instalacion. Despues de desinstalar todo y ejecutar los comandos:
sudo apt-get autoremove
sudo apt-get autoclean
Intento realizar nuevamente la instalacion pero me muestra este error:
Setting up mysql-server-5.7 (5.7.32-0ubuntu0.18.04.1) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 191: /usr/share/mysql-common/configure-symlinks:
No such file or directory
dpkg: error processing package mysql-server-5.7 (--configure):
installed mysql-server-5.7 package post-installation script subprocess returned error exit status
127
Setting up libfcgi-perl (0.78-2build1) ...
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Setting up libhtml-template-perl (2.97-1) ...
Setting up libcgi-fast-perl (1:2.13-1) ...
Processing triggers for systemd (237-3ubuntu10.42) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Edit: por curiosidad he ejecutado el codigo
sudo apt-get install apache2 -y
Esperaba que me respondiera que no habia nada que installar porque ya estaba instalado en lugar de eso lo que recibi fue un error, referente a Mysql-Server-5.7
nor01@vps:/$ sudo apt-get install apache2 -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
apache2 is already the newest version (2.4.29-1ubuntu4.14).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.7 (5.7.32-0ubuntu0.18.04.1) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 191: /usr/share/mysql-
common/configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-5.7 (--configure):
installed mysql-server-5.7 package post-installation script subprocess
returned error exit status 127
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Lo que busco:
Eliminar todo lo referente a Mysql o MariaDB (porque creo que ambas instancias se instalaron). Luego de esto poder instalar Mysql en Vps con ubuntu 18.04 desde 0.
Lo que he intentado:
sudo apt update
sudo systemctl stop mysql
sudo apt-get remove --purge mysql-client-5.7
sudo apt-get remove --purge mysql-server-5.7
sudo apt purge mysql-server mysql-client mysql-common
sudo apt autoremove
sudo mv -iv /var/lib/mysql /var/tmp/mysql-backup
sudo rm -rf /var/lib/mysql*
He seguido un par de post pero ninguno me ha dado solucion.
https://stackoverflow.com/questions/60345231/completely-remove-mariadb-10-01-in-ubuntu-18-04 https://stackoverflow.com/questions/25244606/completely-remove-mysql-ubuntu-14-04-lts/28113482#28113482
El mismo error que muestro arriba es lo que me muestra al intentar realizar la instalacion como lo siguieren.