I've got a problem on my system, where I can't install or remove programs using apt-get due to unmet dependencies, however I can't install dependencies because I keep getting the error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
galera-3 libdbi-perl mysql-server mysql-server-5.7
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
plesk-config-troubleshooter psa-imp
0 upgraded, 0 newly installed, 2 to remove and 4 not upgraded.
1 not fully installed or removed.
After this operation, 20.4 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 118238 files and directories currently installed.)
Removing psa-imp (6.2.17-ubuntu16.04.build1705170314.14) ...
dpkg action:
Trying to start service mysql... /usr/sbin/mysqld is stopped
done
Trying to establish test connection... ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
And Trying to establish test connection... ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
just repeats many times before saying
failed
ERROR while trying to establish test connection
Check the error reason(see log file: /var/log/plesk/install/plesk_17.5.3_installation.log), fix and try again
establish test connection
***** installing problem report *****
ERROR while trying to establish test connection
Check the error reason(see log file: /var/log/plesk/install/plesk_17.5.3_installation.log), fix and try again
establish test connection
dpkg: error processing package plesk-config-troubleshooter (--remove):
subprocess installed pre-removal script returned error exit status 1
Errors were encountered while processing:
psa-imp
plesk-config-troubleshooter
E: Sub-process /usr/bin/dpkg returned an error code (1)
W: Operation was interrupted before it could finish
The issue is related to mysql, as when I attempt to run mysql from any account, whether it's a user account, admin, or root, I get the same error (with a different username). After looking for fixes on the internet, I've tried using: mysqld --skip-grant-tables
followed by mysql -u root mysql
however I just get the same error of ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
. I tried also mysql -hxxx.xxx.xxx.xxx -uroot -p
and get this error: ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (111)
(ip replaced with xxx)
I have also tried editing /etc/my.cnf
which I found in another SO post, but the file is empty, as well as sudo dpkg-reconfigure mysql-server
which is supposed to reset the root password, but it doesn't help.