LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-13-2020, 05:36 PM   #1
Oldy
Member
 
Registered: Jul 2020
Posts: 40

Rep: Reputation: Disabled
Unhappy How do I remove SQL and start over with mariadb ?


Hi there.

I have to remove MySQL/MariaDB, but I can't either - sudo apt remove/autoremove/purge, there are lots of error from it. Ubuntu 20 VPS.


https://www.screencast.com/t/5a1Z19Mq
https://ibb.co/LQhjY7r

sudo apt remove -f mysql-server-8.0
PHP Code:
...
dpkgerror while cleaning up:
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered 
while processing:
ESub-process /usr/bin/dpkg returned an error code (1
Can you help me?
 
Old 07-13-2020, 06:47 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
First, if you have any database(s) in use, export it (them) to *.sql files.

Did you stop MySQL before you tried to remove it?
 
Old 07-14-2020, 06:56 AM   #3
Oldy
Member
 
Registered: Jul 2020
Posts: 40

Original Poster
Rep: Reputation: Disabled
I have no sql only test if it's works.

/etc/init.d/mysqld stop
bash: /etc/init.d/mysqld: No such fire or directory

service mysqld stop
Failed to stop mysqld.service: Unit mysqld.loaded.

service mysql stop
Failed to stop mysql.service: Unit mysql.loaded.

apt install mariadb-server
...
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
Old 07-14-2020, 08:20 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
first try to remove/purge it completely (before installation).
probably you need to reinstall now mysqld to be able to remove it completely.
1. stop
2. check if no mysql process running
3. disable service
4. uninstall/purge
5. a reboot may help
6. install mariadb
 
Old 07-14-2020, 09:50 AM   #5
Oldy
Member
 
Registered: Jul 2020
Posts: 40

Original Poster
Rep: Reputation: Disabled
Code:
sudo apt remove mysql-server mysql-client mariadb-server mariadb-client phpmyadmin
errors

Code:
sudo apt auroremove  mysql-server mysql-client mariadb-server mariadb-client phpmyadmin
errors

Code:
sudo apt purge mysql-server mysql-client mariadb-server mariadb-client phpmyadmin
errors

Code:
sudo apt remove -f mysql-server-8.0
errors, see the first post.

Code:
sudo reboot
restart

Code:
sudo ps | more
CMD: login, sudo, ps (only)

Code:
sudo apt upgrade
there are lots of errors here too, amongst mysql-server-8.0

sudo find / -name *sql*
Code:
/etc/systemd/system/mysql.service
/etc/systemd/system/mysqld.service
/etc/init.d/mysql
/etc/init/mysql.conf
/etc/logrotate.d/mysql-server
/etc/rc5.d/S01mysql
/etc/apparmor.d/local/usr.sbin.mysqld
/etc/apparmor.d/disable/usr.sbin.mysqld
/etc/apparmor.d/.usr.sbin.mysqld.swp
/etc/apparmor.d/abstractions/mysql
/etc/apparmor.d/usr.sbin.mysqld
/etc/rc2.d/S01mysql
/etc/rc3.d/S01mysql
/etc/rc1.d/K01mysql
/etc/logcheck/ignore.d.paranoid/mysql-server-8_0
/etc/logcheck/ignore.d.workstation/mysql-server-8_0
/etc/logcheck/ignore.d.server/mysql-server-8_0
/etc/rc4.d/S01mysql
/etc/default/mysql
/etc/rc6.d/K01mysql
/etc/mysql
/etc/mysql/mysql.cnf
/etc/mysql/.mysql.185858
/etc/mysql/.mysql.289410
/etc/mysql/mysql.conf.d
/etc/mysql/mysql.conf.d/mysql.cnf
/etc/mysql/mysql.conf.d/mysqld.cnf
/etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf
/etc/mysql/mariadb.conf.d/50-mysql-clients.cnf
/etc/mysql/conf.d/mysql.cnf
/etc/mysql/conf.d/mysqldump.cnf
/etc/rc0.d/K01mysql
/etc/php/7.4/cli/conf.d/20-mysqli.ini
/etc/php/7.4/cli/conf.d/20-pdo_mysql.ini
/etc/php/7.4/cli/conf.d/10-mysqlnd.ini
/etc/php/7.4/fpm/conf.d/20-mysqli.ini
/etc/php/7.4/fpm/conf.d/20-pdo_mysql.ini
/etc/php/7.4/fpm/conf.d/10-mysqlnd.ini
/etc/php/7.4/mods-available/pdo_mysql.ini
/etc/php/7.4/mods-available/mysqli.ini
/etc/php/7.4/mods-available/mysqlnd.ini
/root/.mysql_history
/usr/share/mime/application/x-kexiproject-sqlite3.xml
/usr/share/mime/application/vnd.sqlite3.xml
/usr/share/mime/application/x-sqlite2.xml
/usr/share/mime/application/x-kexiproject-sqlite2.xml
/usr/share/mime/application/sql.xml
/usr/share/sosreport/sos/plugins/__pycache__/mysql.cpython-38.pyc
/usr/share/sosreport/sos/plugins/__pycache__/postgresql.cpython-38.pyc
/usr/share/sosreport/sos/plugins/__pycache__/mssql.cpython-38.pyc
/usr/share/sosreport/sos/plugins/mysql.py
/usr/share/sosreport/sos/plugins/mssql.py
/usr/share/sosreport/sos/plugins/postgresql.py
/usr/share/dbconfig-common/scripts/phpmyadmin/upgrade/mysql
/usr/share/dbconfig-common/dpkg/postinst.pgsql
/usr/share/dbconfig-common/dpkg/preinst.sqlite
/usr/share/dbconfig-common/dpkg/frontend.config.pgsql
/usr/share/dbconfig-common/dpkg/frontend.preinst.pgsql
/usr/share/dbconfig-common/dpkg/prerm.pgsql
/usr/share/dbconfig-common/dpkg/postinst.sqlite3
/usr/share/dbconfig-common/dpkg/config.pgsql
/usr/share/dbconfig-common/dpkg/preinst.pgsql
/usr/share/dbconfig-common/dpkg/prerm.sqlite
/usr/share/dbconfig-common/dpkg/postrm.sqlite
/usr/share/dbconfig-common/dpkg/postinst.sqlite
/usr/share/dbconfig-common/dpkg/postrm.pgsql
/usr/share/dbconfig-common/dpkg/config.sqlite3
/usr/share/dbconfig-common/dpkg/prerm.mysql
/usr/share/dbconfig-common/dpkg/postrm.mysql
/usr/share/dbconfig-common/dpkg/config.mysql
/usr/share/dbconfig-common/dpkg/frontend.postrm.pgsql
/usr/share/dbconfig-common/dpkg/frontend.postinst.pgsql
/usr/share/dbconfig-common/dpkg/frontend.postrm.mysql
/usr/share/dbconfig-common/dpkg/frontend.prerm.mysql
/usr/share/dbconfig-common/dpkg/postinst.mysql
/usr/share/dbconfig-common/dpkg/frontend.prerm.pgsql
/usr/share/dbconfig-common/dpkg/prerm.sqlite3
/usr/share/dbconfig-common/dpkg/frontend.config.mysql
/usr/share/dbconfig-common/dpkg/postrm.sqlite3
/usr/share/dbconfig-common/dpkg/frontend.preinst.mysql
/usr/share/dbconfig-common/dpkg/preinst.sqlite3
/usr/share/dbconfig-common/dpkg/preinst.mysql
/usr/share/dbconfig-common/dpkg/config.sqlite
/usr/share/dbconfig-common/dpkg/frontend.postinst.mysql
/usr/share/dbconfig-common/data/phpmyadmin/upgrade/mysql
/usr/share/dbconfig-common/data/phpmyadmin/install/mysql
/usr/share/dbconfig-common/internal/sqlite
/usr/share/dbconfig-common/internal/pgsql
/usr/share/dbconfig-common/internal/dbc-mysql
/usr/share/dbconfig-common/internal/mysql
/usr/share/apport/package-hooks/source_mysql-8.0.py
/usr/share/vim/vim81/ftplugin/sql.vim
/usr/share/vim/vim81/doc/ft_sql.txt
/usr/share/vim/vim81/autoload/sqlcomplete.vim
/usr/share/vim/vim81/indent/sqlanywhere.vim
/usr/share/vim/vim81/indent/sql.vim
/usr/share/vim/vim81/syntax/sqlj.vim
/usr/share/vim/vim81/syntax/sqlinformix.vim
/usr/share/vim/vim81/syntax/msql.vim
/usr/share/vim/vim81/syntax/sqlanywhere.vim
/usr/share/vim/vim81/syntax/sqlhana.vim
/usr/share/vim/vim81/syntax/esqlc.vim
/usr/share/vim/vim81/syntax/sql.vim
/usr/share/vim/vim81/syntax/mysql.vim
/usr/share/vim/vim81/syntax/plsql.vim
/usr/share/vim/vim81/syntax/sqlforms.vim
/usr/share/vim/vim81/syntax/sqloracle.vim
/usr/share/mysql-common
/usr/share/doc/libsqlite3-0
/usr/share/doc/mysql-server-8.0
/usr/share/doc/mysql-server-8.0/mysqld.sym.gz
/usr/share/doc/dbconfig-mysql
/usr/share/doc/dbconfig-common/README.pgsql
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-2.1
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-2.1/pgsql-upgrade_2.1.sql
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-2.1/pgsql.sql
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-2.0
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-2.0/pgsql.sql
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-migration-2.0
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-migration-2.0/pgsql.sql
/usr/share/doc/dbconfig-common/examples/db-test-mysql-2.1
/usr/share/doc/dbconfig-common/examples/db-test-mysql-2.1/mysql-upgrade_2.1.sql
/usr/share/doc/dbconfig-common/examples/db-test-mysql-2.1/mysql.sql
/usr/share/doc/dbconfig-common/examples/db-test-sqlite-2.0
/usr/share/doc/dbconfig-common/examples/db-test-sqlite-2.0/sqlite.sql
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-2.2
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-2.2/pgsql-upgrade_2.2.sql
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-2.2/pgsql-upgrade_2.1.sql
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-2.2/pgsql.sql
/usr/share/doc/dbconfig-common/examples/db-test-multidbtype-2.0/mysql.sql
/usr/share/doc/dbconfig-common/examples/db-test-multidbtype-2.0/pgsql.sql
/usr/share/doc/dbconfig-common/examples/db-test-mysql-perl-2.0
/usr/share/doc/dbconfig-common/examples/db-test-mysql-perl-2.0/mysql-install.pl
/usr/share/doc/dbconfig-common/examples/db-test-mysql-frontend-2.0
/usr/share/doc/dbconfig-common/examples/db-test-mysql-2.0
/usr/share/doc/dbconfig-common/examples/db-test-mysql-2.0/mysql.sql
/usr/share/doc/dbconfig-common/examples/db-test-sqlite3-2.0
/usr/share/doc/dbconfig-common/examples/db-test-sqlite3-2.0/sqlite.sql
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-migration-1.9
/usr/share/doc/dbconfig-common/examples/db-test-pgsql-migration-1.9/pgsql.sql
/usr/share/doc/php-mysql
/usr/share/doc/mysql-common
/usr/share/doc/mysql-client-8.0
/usr/share/doc/mysql-client-core-8.0
/usr/share/doc/mysql-server-core-8.0
/usr/share/doc/phpmyadmin/examples/create_tables.sql
/usr/share/doc/libaprutil1-dbd-sqlite3
/usr/share/doc/php7.4-mysql
/usr/share/doc/php-phpmyadmin-sql-parser
/usr/share/nano/postgresql.nanorc
/usr/share/phpmyadmin/sql.php
/usr/share/phpmyadmin/templates/preview_sql.twig
/usr/share/phpmyadmin/db_sql_autocomplete.php
/usr/share/phpmyadmin/libraries/advisory_rules_mysql_before80003.txt
/usr/share/phpmyadmin/libraries/mysql_relations.inc.php
/usr/share/phpmyadmin/libraries/classes/Dbi/DbiMysql.php
/usr/share/phpmyadmin/libraries/classes/Dbi/DbiMysqli.php
/usr/share/phpmyadmin/js/codemirror/addon/lint/sql-lint.js
/usr/share/phpmyadmin/js/transformations/sql_editor.js
/usr/share/phpmyadmin/js/sql.js
/usr/share/phpmyadmin/js/vendor/codemirror/mode/sql
/usr/share/phpmyadmin/js/vendor/codemirror/mode/sql/sql.js
/usr/share/phpmyadmin/js/vendor/codemirror/addon/hint/sql-hint.js
/usr/share/phpmyadmin/db_sql.php
/usr/share/phpmyadmin/db_sql_format.php
/usr/share/phpmyadmin/server_sql.php
/usr/share/phpmyadmin/sql
/usr/share/phpmyadmin/sql/upgrade_tables_4_7_0+.sql
/usr/share/phpmyadmin/sql/upgrade_tables_mysql_4_1_2+.sql
/usr/share/phpmyadmin/sql/upgrade_column_info_4_3_0+.sql
/usr/share/phpmyadmin/sql/create_tables.sql
/usr/share/phpmyadmin/tbl_sql.php
/usr/share/phpmyadmin/themes/pmahomme/img/b_sqlhelp.png
/usr/share/phpmyadmin/themes/pmahomme/img/b_docsql.png
/usr/share/phpmyadmin/themes/pmahomme/img/b_sql.png
/usr/share/phpmyadmin/themes/pmahomme/img/b_sqldoc.png
/usr/share/phpmyadmin/themes/original/img/b_sqlhelp.png
/usr/share/phpmyadmin/themes/original/img/b_sql.png
/usr/share/php7.4-mysql
/usr/share/php7.4-mysql/mysql
/usr/share/php7.4-mysql/mysql/pdo_mysql.ini
/usr/share/php7.4-mysql/mysql/mysqli.ini
/usr/share/php7.4-mysql/mysql/mysqlnd.ini
/usr/share/bash-completion/completions/isql
/usr/share/bash-completion/completions/mysqladmin
/usr/share/bash-completion/completions/psql
/usr/share/bash-completion/completions/sqlite3
/usr/share/bash-completion/completions/mysql
/usr/share/man/man1/mysqlimport.1.gz
/usr/share/man/man1/mysqloptimize.1.gz
/usr/share/man/man1/mysql_upgrade.1.gz
/usr/share/man/man1/mysqlman.1.gz
/usr/share/man/man1/mysql_ssl_rsa_setup.1.gz
/usr/share/man/man1/mysqldump.1.gz
/usr/share/man/man1/mysqlreport.1.gz
/usr/share/man/man1/mysql_tzinfo_to_sql.1.gz
/usr/share/man/man1/mysql_secure_installation.1.gz
/usr/share/man/man1/mysqlpump.1.gz
/usr/share/man/man1/mysql.1.gz
/usr/share/man/man1/mysqladmin.1.gz
/usr/share/man/man1/mysqlcheck.1.gz
/usr/share/man/man1/mysqlanalyze.1.gz
/usr/share/man/man1/mysqlrepair.1.gz
/usr/share/man/man1/mysqlslap.1.gz
/usr/share/man/man1/mysql_config_editor.1.gz
/usr/share/man/man1/mysqld_multi.1.gz
/usr/share/man/man1/mysqlbinlog.1.gz
/usr/share/man/man1/mysqld_safe.1.gz
/usr/share/man/man1/mysqldumpslow.1.gz
/usr/share/man/man1/mysqlshow.1.gz
/usr/share/man/man8/mysqld.8.gz
/usr/share/bug/php7.4-mysql
/usr/share/mysql
/usr/share/mysql/mysqld_multi.server
/usr/share/mysql/mysql-log-rotate
/usr/share/mysql/mysql-systemd-start
/usr/share/mysql/install_rewriter.sql
/usr/share/mysql/uninstall_rewriter.sql
/usr/share/mysql/debian_create_root_user.sql
/usr/share/mysql/innodb_memcached_config.sql
/usr/share/lintian/overrides/mysql-server-8.0
/usr/share/lintian/overrides/mysql-common
/usr/share/lintian/overrides/mysql-client-8.0
/usr/share/lintian/overrides/php7.4-mysql
/usr/bin/mysqladmin
/usr/bin/mysqlpump
/usr/bin/mysql_config_editor
/usr/bin/mysqlimport
/usr/bin/mysqldumpslow
/usr/bin/mysqlslap
/usr/bin/mysqlshow
/usr/bin/mysqloptimize
/usr/bin/mysqlbinlog
/usr/bin/mysqlcheck
/usr/bin/mysqld_multi
/usr/bin/mysql_tzinfo_to_sql
/usr/bin/mysql_ssl_rsa_setup
/usr/bin/mysql_upgrade
/usr/bin/mysqlanalyze
/usr/bin/mysqldump
/usr/bin/mysqlreport
/usr/bin/mysqld_safe
/usr/bin/mysql
/usr/bin/mysql_secure_installation
/usr/bin/mysqlrepair
/usr/sbin/mysqld
/usr/lib/python3.8/sqlite3
/usr/lib/python3.8/lib-dynload/_sqlite3.cpython-38-x86_64-linux-gnu.so
/usr/lib/systemd/system/mysql.service
/usr/lib/x86_64-linux-gnu/apr-util-1/apr_dbd_sqlite3-1.so
/usr/lib/x86_64-linux-gnu/apr-util-1/apr_dbd_sqlite3.so
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
/usr/lib/x86_64-linux-gnu/perl5/5.30/auto/DBI/dbi_sql.h
/usr/lib/python2.7/sqlite3
/usr/lib/python2.7/lib-dynload/_sqlite3.x86_64-linux-gnu.so
/usr/lib/mysql
/usr/lib/mysql/plugin/mysql_no_login.so
/usr/lib/mysql/plugin/component_mysqlbackup.so
/usr/lib/mysql/plugin/mysql_clone.so
/usr/lib/php/20190902/pdo_mysql.so
/usr/lib/php/20190902/mysqli.so
/usr/lib/php/20190902/mysqlnd.so
/var/www/html/test.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli
/var/www/html/test.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php
/var/www/html/test.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
/var/www/html/test.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
/var/www/html/test.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php
/var/crash/mysql-server-8.0.0.crash
/var/crash/mysql-server-8.0.0.crash_
/var/log/mysql
/var/lib/systemd/deb-systemd-helper-enabled/mysql.service
/var/lib/systemd/deb-systemd-helper-enabled/mysqld.service
/var/lib/dpkg/info/mysql-common.prerm
/var/lib/dpkg/info/mysql-server-8.0.prerm
/var/lib/dpkg/info/php7.4-mysql.triggers
/var/lib/dpkg/info/php7.4-mysql.preinst
/var/lib/dpkg/info/libsqlite3-0:amd64.shlibs
/var/lib/dpkg/info/mysql-server-8.0.conffiles
/var/lib/dpkg/info/dbconfig-mysql.md5sums
/var/lib/dpkg/info/php-mysql.md5sums
/var/lib/dpkg/info/php-phpmyadmin-sql-parser.md5sums
/var/lib/dpkg/info/mysql-server-core-8.0.shlibs
/var/lib/dpkg/info/mysql-server-8.0.md5sums
/var/lib/dpkg/info/mysql-common.preinst
/var/lib/dpkg/info/php-phpmyadmin-sql-parser.list
/var/lib/dpkg/info/mysql-server-8.0.preinst
/var/lib/dpkg/info/php-mysql.list
/var/lib/dpkg/info/php7.4-mysql.md5sums
/var/lib/dpkg/info/libsqlite3-0:amd64.list
/var/lib/dpkg/info/php7.4-mysql.list
/var/lib/dpkg/info/mysql-client-8.0.list
/var/lib/dpkg/info/libsqlite3-0:amd64.symbols
/var/lib/dpkg/info/libaprutil1-dbd-sqlite3:amd64.md5sums
/var/lib/dpkg/info/mysql-server-core-8.0.md5sums
/var/lib/dpkg/info/mysql-common.postrm
/var/lib/dpkg/info/mysql-server-8.0.templates
/var/lib/dpkg/info/libsqlite3-0:amd64.md5sums
/var/lib/dpkg/info/mysql-client-core-8.0.md5sums
/var/lib/dpkg/info/mysql-client-core-8.0.list
/var/lib/dpkg/info/mysql-server-core-8.0.list
/var/lib/dpkg/info/libaprutil1-dbd-sqlite3:amd64.list
/var/lib/dpkg/info/dbconfig-mysql.list
/var/lib/dpkg/info/mysql-common.md5sums
/var/lib/dpkg/info/mysql-server-8.0.postinst
/var/lib/dpkg/info/mysql-client-8.0.md5sums
/var/lib/dpkg/info/mysql-server-8.0.config
/var/lib/dpkg/info/php7.4-mysql.postinst
/var/lib/dpkg/info/mysql-server-8.0.postrm
/var/lib/dpkg/info/libsqlite3-0:amd64.triggers
/var/lib/dpkg/info/php7.4-mysql.postrm
/var/lib/dpkg/info/mysql-server-core-8.0.triggers
/var/lib/dpkg/info/php7.4-mysql.prerm
/var/lib/dpkg/info/mysql-server-8.0.list
/var/lib/dpkg/info/mysql-common.postinst
/var/lib/dpkg/info/mysql-common.list
/var/lib/dpkg/info/mysql-common.conffiles
/var/lib/ucf/cache/:etc:php:7.4:mods-available:mysqli.ini
/var/lib/ucf/cache/:etc:php:7.4:mods-available:pdo_mysql.ini
/var/lib/ucf/cache/:etc:php:7.4:mods-available:mysqlnd.ini
/var/lib/mysql-keyring
/var/lib/mysql-upgrade
/var/lib/mysql-files
/var/lib/mysql
/var/lib/mysql/mysql_upgrade_info
/var/lib/mysql/mysql
/var/lib/php/modules/7.4/apache2/disabled_by_maint/mysqli
/var/lib/php/modules/7.4/apache2/disabled_by_maint/mysqlnd
/var/lib/php/modules/7.4/apache2/disabled_by_maint/pdo_mysql
/var/lib/php/modules/7.4/cli/enabled_by_maint/mysqli
/var/lib/php/modules/7.4/cli/enabled_by_maint/mysqlnd
/var/lib/php/modules/7.4/cli/enabled_by_maint/pdo_mysql
/var/lib/php/modules/7.4/registry/mysqli
/var/lib/php/modules/7.4/registry/mysqlnd
/var/lib/php/modules/7.4/registry/pdo_mysql
/var/lib/php/modules/7.4/fpm/enabled_by_maint/mysqli
/var/lib/php/modules/7.4/fpm/enabled_by_maint/mysqlnd
/var/lib/php/modules/7.4/fpm/enabled_by_maint/pdo_mysql
/var/cache/apt/archives/mysql-server_8.0.20-0ubuntu0.20.04.1_all.deb

Last edited by Oldy; 07-14-2020 at 09:59 AM.
 
Old 07-14-2020, 09:52 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
without posting exactly what's happened there is no way to go forward. (also I told you probably a reinstall will help you to remove it completely)
 
Old 07-14-2020, 11:05 AM   #7
Oldy
Member
 
Registered: Jul 2020
Posts: 40

Original Poster
Rep: Reputation: Disabled
sudo apt reinstall mysql-server mysql-client mariadb-server mariadb-client phpmyadmin


Code:
Reading package lists...
Building dependency tree...
Reading state information...
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:
 mariadb-client : Depends: mariadb-client-10.3 (>= 1:10.3.22-1ubuntu1) but it is not going to be installed
 mariadb-server : Depends: mariadb-server-10.3 (>= 1:10.3.22-1ubuntu1) but it is not going to be installed


sudo apt autoremove mysql-server mysql-client mariadb-server mariadb-client phpmyadmin
Code:
Reading package lists...
Building dependency tree...
Reading state information...
Package 'mariadb-client' is not installed, so not removed
Package 'mariadb-server' is not installed, so not removed
Package 'mysql-client' is not installed, so not removed
Package 'mysql-server' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-8.0 (8.0.20-0ubuntu0.20.04.1) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
mysqld will log errors to /var/log/mysql/error.log
2020-07-14T16:27:00.414756Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
Skipping profile in /etc/apparmor.d/disable: usr.sbin.mysqld
Failed to preset unit: File mysql.service: Link has been severed
/usr/bin/deb-systemd-helper: error: systemctl preset failed on mysql.service: No such file or directory
Failed to start mysql.service: Unit mysql.service not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 mysql-server-8.0


/etc/mysql/mysql.conf.d/mysqld.cnf
Code:
...
[mysqld]
innodb_force_recovery = 4
...

/var/log/mysql/error.log
Code:
[System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.20-0ubuntu0.20.04.1)  (Ubuntu).
[System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.20-0ubuntu0.20.04.1) starting as process 4142
[System] [MY-011012] [Server] Starting upgrade of data directory.
[System] [MY-013576] [InnoDB] InnoDB initialization has started.
[ERROR] [MY-012936] [InnoDB] Database upgrade cannot be accomplished with innodb_force_recovery > 0
[ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
[ERROR] [MY-011013] [Server] Failed to initialize DD Storage Engine.
[ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
[ERROR] [MY-010119] [Server] Aborting

/var/log/mysql/error.log //innodb_force_recovery = 0
Code:
[System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.20-0ubuntu0.20.04.1)  (Ubuntu).
[System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.20-0ubuntu0.20.04.1) starting as process 4617
[System] [MY-011012] [Server] Starting upgrade of data directory.
[System] [MY-013576] [InnoDB] InnoDB initialization has started.
[ERROR] [MY-011971] [InnoDB] Tablespace 'innodb_undo_001' Page [page id: space=4294967279, page number=3] log sequence number 2824512 is in the future! Current system log sequence number 1659940.
[ERROR] [MY-011972] [InnoDB] Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html for information about forcing recovery.
[ERROR] [MY-011971] [InnoDB] Tablespace 'innodb_undo_001' Page [page id: space=4294967279, page number=4] log sequence number 1673689 is in the future! Current system log sequence number 1659940.
sudo apt upgrade
Code:
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Setting up mysql-server-8.0 (8.0.20-0ubuntu0.20.04.1) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
mysqld will log errors to /var/log/mysql/error.log
2020-07-14T21:32:49.300849Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
Skipping profile in /etc/apparmor.d/disable: usr.sbin.mysqld
Failed to preset unit: File mysql.service: Link has been severed
/usr/bin/deb-systemd-helper: error: systemctl preset failed on mysql.service: No such file or directory

Failed to start mysql.service: Unit mysql.service not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 mysql-server-8.0

Last edited by Oldy; 07-14-2020 at 04:33 PM.
 
Old 07-15-2020, 03:05 AM   #8
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Try dpkg -C. It may suggest how to fix it.
 
Old 07-15-2020, 10:22 AM   #9
Oldy
Member
 
Registered: Jul 2020
Posts: 40

Original Poster
Rep: Reputation: Disabled
oldy: dpkg -C
Code:
dpkg: error: unable to check lock file for dpkg package directory /var/lib/dpkg: Permission denied

oldy: sudo dpkg -C
Code:
The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 mysql-server-8.0     MySQL database server binaries and system database setup
 
Old 07-15-2020, 11:26 AM   #10
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
So, do what it suggested:
Code:
sudo dpkg --configure mysql-server-8.0
 
Old 07-15-2020, 11:54 AM   #11
Oldy
Member
 
Registered: Jul 2020
Posts: 40

Original Poster
Rep: Reputation: Disabled
sudo dpkg --configure mysql-server-8.0
Code:
failed to stop mysql.service unit mysql.service not loaded
invoke-rc.d initscript mysql action start failed
...
(and lots of errors)
...
sudo find / -name mysql-server-8.0
Code:
/usr/share/doc/mysql-server-8.0
/usr/share/lintian/overrides/mysql-server-8.0
 
Old 07-15-2020, 12:14 PM   #12
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
A guess: The mysql database is still present, so the installation is attempting to update it to the current version.
You said there was no data in it, so just hide it.
On my system, it is /var/log/mysql, but it should be defined in /etc/my.cnf:
Code:
datadir = /var/lib/mysql
That directory contains directories which contain the database files. Try renaming the directory and retrying the install.
 
Old 07-15-2020, 01:00 PM   #13
Oldy
Member
 
Registered: Jul 2020
Posts: 40

Original Poster
Rep: Reputation: Disabled
sudo mv /var/lib/mysql /var/lib/mysql_

sudo apt install mysql-server mysql-client mariadb-server mariadb-client
Code:
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:
 mariadb-client : Depends: mariadb-client-10.3 (>= 1:10.3.22-1ubuntu1) but it is not going to be installed
 mariadb-server : Depends: mariadb-server-10.3 (>= 1:10.3.22-1ubuntu1) but it is not going to be installed

sudo apt remove mysql-server mysql-client mariadb-server mariadb-client
Code:
Package 'mariadb-client' is not installed, so not removed
Package 'mariadb-server' is not installed, so not removed
Package 'mysql-client' is not installed, so not removed
Package 'mysql-server' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-8.0 (8.0.20-0ubuntu0.20.04.1) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Specified filename /var/lib/mysql/ibdata1 does not exist.
mysqld will log errors to /var/log/mysql/error.log
2020-07-15T17:53:57.688032Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
Skipping profile in /etc/apparmor.d/disable: usr.sbin.mysqld
Failed to preset unit: File mysql.service: Link has been severed
/usr/bin/deb-systemd-helper: error: systemctl preset failed on mysql.service: No such file or directory
Failed to start mysql.service: Unit mysql.service not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 mysql-server-8.0

Last edited by Oldy; 07-15-2020 at 01:38 PM.
 
Old 07-16-2020, 03:18 AM   #14
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Then force purge the package:
Code:
sudo dpkg --force-all -P mysql-server-8.0
 
Old 07-16-2020, 04:38 AM   #15
Oldy
Member
 
Registered: Jul 2020
Posts: 40

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
Code:
sudo dpkg --force-all -P mysql-server-8.0

Code:
Failed to stop mysql.service: Unit mysql.service not failed.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing package mysql-server-8.0 (--purge)
installed mysql-server-8.0 package pre-removal script subprocess returned error exit 1
...
Failed to preset unit: Failed mysql.service: Link has been servered /usr/bin/deb-systemd-helper: error: systemctld preset failed on mysql.service: No such file or directory
...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Introduction to MySQL/MariaDB database SQL views LXer Syndicated Linux News 0 08-04-2019 07:21 AM
LXer: KDE Participating in Google Summer of Code 2019, MariaDB Releasing New Open-Source MariaDB Enterprise Server, CentOS Celebrates 15th B LXer Syndicated Linux News 0 02-28-2019 06:50 AM
LXer: How to Install and Use Microsoft SQL Server (MS SQL) on RHEL 7, CentOS 7 and Ubuntu 16.04 LTS LXer Syndicated Linux News 0 12-09-2016 06:45 PM
[SOLVED] how to create fake DATA inside MariaDB SQL database??? cyberdome Linux - Newbie 5 05-16-2016 08:00 AM
My SQL and M$SQL ikw38 Linux - Software 2 07-03-2003 01:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration