BeneficialCucumber Posted February 13, 2022 Report Share Posted February 13, 2022 (edited) Hi guys. I think I accidentally removed a critical database user account. It was during a cleanup process where old/unused databases and users were removed. My screw up was not doing a backup before starting on this, even though I'm quite sure all the dbs/users were not being used. I was probably wrong on this. This is the following error on the phpvms site: SQLSTATE[28000] [1045] Access denied for user 'testVA_user'@'localhost' (using password: YES) (SQL: select * from `users` where `state` != 5 order by `created_at` desc limit 4) phpVMS version: 7.0.0-dev cPanel Version: 100.0 (build 7) Apache Version: 2.4.52 PHP Version: 7.4.27 MySQL Version: 10.3.32-MariaDB Can anyone advise how it can be resolved please? eg. Creating another account with the same username, but I would still not know what the password of the old account was. Would prefer not to do a full restore as the last one I have is from end-Jan. Edited February 13, 2022 by BeneficialCucumber Quote Link to comment Share on other sites More sharing options...
BeneficialCucumber Posted February 13, 2022 Author Report Share Posted February 13, 2022 (edited) The flight in progress shows the following error message in vmsACARS: There was an error updating this PIREP: SQLSTATE[28000] [1045] Access denied for user 'testVA_user'@'localhost' (using password: YES) (SQL: select * from `users` where `api_key` = XXXXXXXXXXX limit 1 Judging by these symptoms, is this an issue of deleted user account or deleted database? If it is the former, can we "relink" it with another account with a new password? If it's the latter, I will have no choice but to restore from the last automated server backup, but I just want to make very sure this is the case before doing so. Edited February 13, 2022 by BeneficialCucumber Quote Link to comment Share on other sites More sharing options...
BeneficialCucumber Posted February 13, 2022 Author Report Share Posted February 13, 2022 (edited) Disregard. Edited February 13, 2022 by BeneficialCucumber Quote Link to comment Share on other sites More sharing options...
BeneficialCucumber Posted February 13, 2022 Author Report Share Posted February 13, 2022 I have restored everything from the last-known backup. However it is still showing the error message in the first post. Anyone know what might be the issue? Quote Link to comment Share on other sites More sharing options...
DisposableHero Posted February 13, 2022 Report Share Posted February 13, 2022 4 hours ago, BeneficialCucumber said: I have restored everything from the last-known backup. However it is still showing the error message in the first post. Anyone know what might be the issue? If you delete a user from your database engine, then you need to define it back there. Restoring a database backup will NOT restore the users, it will only restore the structure and data. Database users are not stored in the database itself, they are stored by the database server. Anyway; Either create the same user back from your control panel, grant access to that user for your phpvms database. Or create a new user from your control panel, grant access to that user for your phpvms database, enter that users info to your env.php, clean the application cache manually (folders are explained here , check #3 ) Good luck 1 Quote Link to comment Share on other sites More sharing options...
BeneficialCucumber Posted February 17, 2022 Author Report Share Posted February 17, 2022 (edited) Thank you DH, your advice was invaluable and resolved the issue. Edited February 17, 2022 by BeneficialCucumber Quote Link to comment Share on other sites More sharing options...
DisposableHero Posted February 18, 2022 Report Share Posted February 18, 2022 Glad it worked and saved you from more trouble Safe flights Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.