0

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.

1
  • 1
    That looks like a sql error. Post the command you are running and full output.
    – Panther
    Apr 14, 2017 at 22:58

1 Answer 1

0

It seems that my sql is stopped try starting the service and then work again. It is because mysql is stopped you are unable to login mysql. You can start mysql either by sudo service mysql start or /etc/init.d/ mysql start if it has init script.

4
  • It's not stopped. When the service is stopped, the error is ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
    – Matt
    Apr 15, 2017 at 11:39
  • Didn't help, didn't change a single thing. Exact same error.
    – Matt
    Apr 17, 2017 at 14:28
  • There is no such directory, and autoremove can not run due to unmet dependencies.
    – Matt
    Apr 18, 2017 at 11:43
  • Sorry location is /var/cache/apt/archives and you need previlages to rm *.deb files there will be a dir partial remove that too manually.
    – Mani
    Apr 18, 2017 at 11:57

Not the answer you're looking for? Browse other questions tagged .