Restoring Admin user fails -

codes9

Verified User
Joined
Sep 5, 2019
Messages
73
I'm trying to restore a backup of the admin user from a VPS I'm moving to another VPS.

I keep running into errors in the Admin Backup/Restore tool:
Unable to restore database admin_*****.sql to admin_predating: ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)

I'm able to login to Mysql from SSH using the Admin user's login password.

Is there anywhere I should set this password in Directadmin config?
 
Hmm, seems like the backup restore tool is not using the correct password when restoring the database from the archive.

I've reset the admin user's password to try to bring things back into sync.

I found this article https://www.directadmin.com/features.php?id=1817 which suggests allowing the backup script to use da_admin to restore.

In the end I'm restoring the files by hand in the terminal with the root account. All database backup / restore in DA for this user is not working. I suspect that Directadmin is using the wrong mariadb password for this user.

I've also tried setting up a my.cnf file in the admin users home. This works from the terminal.

Anyone know where this password is stored/reset in Directadmin
 
Reset the Admin user's password in MySql. I verified it works from terminal. But from Directadmin it's impossible to restore Databases, make changes in PhpMyAdmin or Change the DNS zone.

After some digging I found the zone file was not restored from the backup. I created a zone file by hand but it's empty and even after setting it's permissions the Admin user can't write to it from DirectAdmin. https://forum.directadmin.com/threads/dns-management-error-reading-db-file.52308/

Tried SmTalk's advice on resetting permissions using the Directadmin Script https://forum.directadmin.com/threads/how-to-fix-permissions.28178/

After running this command to restore all permissions I still can't get this fixed in DirectAdmin.

Does anyone know if the Admin user's password is also stored somewhere in DirectAdmin config?
 
Last edited:
Reset the Admin user's password in MySql. I verified it works from terminal. But from Directadmin it's impossible to restore Databases, make changes in PhpMyAdmin or Change the DNS zone.

Take a look at the da_admin mysql user.
/usr/local/directadmin/conf/mysql.conf
 
also if you forgot your da_admin authentication and you don't know how to fix, just use this future for easy way
Thanks I've reset the da_admin user. :)
Take a look at the da_admin mysql user.
/usr/local/directadmin/conf/mysql.conf
Thanks for the reminder about /usr/local/directadmin/conf/mysql.conf. I updated it accordingly :)

Database features now work a treat again from DirectAdmin.

This script helped recreate my zone files.

My named.conf also needed updating. This latest restore failed horribly. 😵 I recreated the zones from the old server by hand.

Looks like I've got everything migrated. Phew!
 
Back
Top