I know that this question has already been asked but the answers do not solve my problem.
MySQL-Server version: 8.0.23-0ubuntu0.20.04.1 (Ubuntu)
OS: Kubuntu 20.04 amd64
I have now uninstalled and reinstalled MySQL Server 8.0.
During the first MySQL server installation I was asked for password validation policy
I selected: level 2 = STRONG.
Now, after reinstalling MySQL server, when I run mysql_secure_installation
, the question about "password validation policy" is not asked anymore.
I think this issue is related to the "password validation policy", because after the "Kubuntu 20.04" installation I uninstalled the KWalletManager and now the passwords can only be stored in plain text, like my WiFi password. I tried to fix this by reinstalling "KWalletManager" but for some reason it did not work.
How to fix this?
dbconfig-common
An error occurred while installing the database:
ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) . Your options are:
- abort - Causes the operation to fail; you will need to downgrade,
reinstall, reconfigure this package, or otherwise manually intervene
to continue using it. This will usually also impact your ability to
install other packages until the installation failure is resolved.- retry - Prompts once more with all the configuration questions
(including ones you may have missed due to the debconf priority
setting) and makes another attempt at performing the operation.- retry (skip questions) - Immediately attempts the operation again,
skipping all questions. This is normally useful only if you have
solved the underlying problem since the time the error occurred.- ignore - Continues the operation ignoring dbconfig-common errors.
This will usually leave this package without a functional database.
The MySQL service runs without errors.
systemctl status mysql.service
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-05-12 18:23:39 CEST; 4h 35min ago
Main PID: 5410 (mysqld)
Status: "Server is operational"
Tasks: 39 (limit: 16722)
Memory: 331.3M
CGroup: /system.slice/mysql.service
└─5410 /usr/sbin/mysqldMai 12 18:23:38 anonymous systemd3: Starting MySQL Community Server...
Mai 12 18:23:39 anonymous systemd3: Started MySQL Community Server.
The password is encrypted
cat etc/mysql/debian.cnf
Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = XXXXXXXXXXXXXXXX
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = XXXXXXXXXXXXXXXX
socket = /var/run/mysqld/mysqld.sock
Log in via Command Line Interface
mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 29
Server version: 8.0.23-0ubuntu0.20.04.1 (Ubuntu)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \q
Bye
I can also login without a password.
mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 30
Server version: 8.0.23-0ubuntu0.20.04.1 (Ubuntu)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \q
Bye
mysql -u debian-sys-maint -p
Enter password:
ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
mysql -u debian-sys-maint
ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: NO)
I solved the issue.
The failure was caused by missing of the avahi-daemon.service, which I uninstalled after the Kubuntu installation.
Once I reinstalled "avahi-daemon", I had to uninstall the "MySQL-Server" and all associated files, also I had to delete the user "mysql" and the group "mysql", then reinstall MySQL-Server and phpMyAdmin.