Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

ERROR 1045 (28000): Access denied for use 'debian-sys-maint'@'localhost' (using password: YES)

Writer Olivia Zamora

I am trying to uninstall php and phpmyadmin on my machine that has Linux Mint, but when I go to uninstall the database for phpmyadmin, in the panel that appears when installing and uninstalling phpmyadmin from the terminal I get this message:

An error occurred while deleting the database:
ERROR 1045 (28000): Access denied for user
'debian-sys-maint'@'localhost' (using password: YES)

Does anyone know what is going on?

1 Answer

debian-sys-maint is a system user that the package manager uses for performing administrative tasks. It seems you've either removed that user or changed the password. The password is stored on disk at /etc/mysql/debian.cnf.

Probably the best solution is to reconfigure the database server, probably with dpkg-reconfigure mysql-server or dpkg-reconfigure mariadb-server (although those are metapackages, so there's a chance you'd need to use the specific version such as dpkg-reconfigure mariadb-server-10.5 but offhand I don't think that will be needed).

Reconfiguring the package will cause the package manager to recreate the debian-sys-maint user and from there it will be able to remove the phpMyAdmin package.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.