Reputation: 39
My MariaDB Server can not be stopped/restarted without an error.
History: I was running a MySQL-Server on Lubuntu 14.04. To chance the hard disk, I stored the database with
mysqldump -u root -p --events --all-databases > dump.sql
set up the new system (still Lubuntu 14.04), but now with MariaDB, and played back the database with
mysql -u root -p < dump.sql
Everything seemed to work well. But now I discovered that a server restart displays an error:
service mysql stop
says "fail". After killing and restart with
service mysql start
I get the message
ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost'
In several forums (also here) is advised to set a neu password for debian-sys-admin with
GRANT ALL PRIVILEGES on . TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '' WITH GRANT OPTION;
but this results in the message
ERROR 1045 (28000): Access denied for user 'root'@'localhost'
(while I'm logged in as root).
I need help!
Upvotes: 1
Views: 1827
Reputation: 542
In all Debian based distributions the MySQL user debian-sys-maint
is needed by the package mysql-server-5.5
to shut down mysql and to do other administration. So you also need see to that the password of that user is correct in /etc/mysql/debian.cnf
. You could set it to the propper value from that file to the user with those commands.
UPDATE mysql.user SET Password=PASSWORD('*secret*') WHERE User='debian-sys-maint';
FLUSH PRIVILEGES;
Read /usr/share/doc/mysql-server-5.5/README.Debian.gz
for more information.
The user debian-sys-maint
also needs all privileges to the mysql
database and the shutdown privileges. You MIGHT try this to set the privileges if they have been removed.
GRANT SHUTDOWN ON *.* TO ‘debian-sys-maint’@’localhost’ identified by ‘*secret*';
GRANT all ON mysql.* TO ‘debian-sys-maint’@’localhost';
FLUSH PRIVILEGES;
where *secret*
is the password set in the file debian.cnf
.
Upvotes: 1