Kategorien
Uncategorized

Migrating MySQL dumps in default Debian installations

Debian uses a separate user for the maintanance of MySQL. That user is called debian-sys-maint and will be created automatically when you install MySQL. If you accidentally delete that user or import an old dump with the „mysql“ user database, the MySQL init-script will complain with such an error-message:

Access denied for user ‚debian-sys-maint’@’localhost‘ (using password: YES)

In that case you should recreate that user with the following steps:

1. Get the password of the user from /etc/mysql/debian.cnf

Debian uses a separate user for the maintanance of MySQL. That user is called debian-sys-maint and will be created automatically when you install MySQL. If you accidentally delete that user or import an old dump with the „mysql“ user database, the MySQL init-script will complain with such an error-message:

Access denied for user ‚debian-sys-maint’@’localhost‘ (using password: YES)

In that case you should recreate that user with the following steps:

1. Get the password of the user from /etc/mysql/debian.cnf
2. Login to your mysql-database and execute the following statement (Replace with the real password from the file /etc/mysql/debian.cnf


GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '' WITH GRANT OPTION;

Now, everything should be fine again… 🙂

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.