Frank S. Hagan Posted July 23 Posted July 23 I'm moving my Invision Community to a new server and getting some database errors I can't seem to resolve. I get a 500 error: Access denied for user 'database-user'@'localhost' (using password: YES) I cannot access the /admin account either. My PHP log errors show this: Quote [23-Jul-2024 01:29:42 UTC] PHP Fatal error:Â Uncaught Error: Class "IPS\Data\Store\Database" not found in /home/username/public_html/forums/system/Data/Store.php:63 Â thrown in /home/username/public_html/forums/system/Data/Store.php on line 63 #6 {main} #5 [internal function]: IPS\IPS::exceptionHandler() #4 /home/username/public_html/forums/init.php(1042): IPS\_Log::log() #3 /home/username/public_html/forums/system/Log/Log.php(118): IPS\_Application::load() #2 /home/username/public_html/forums/system/Application/Application.php(235): IPS\_Application::applications() #1 /home/username/public_html/forums/system/Application/Application.php(145): IPS\_Application::getStore() #0 /home/username/public_html/forums/system/Application/Application.php(174): IPS\Data\_Store::i() Any ideas on this? I have tried editing the config_global.php file to reflect the database name and username, and haven't had any luck (other than the database username changing in the error messages).
Gary Posted July 23 Posted July 23 Hi @Frank S. Hagan, Are you definite the `config_global.php` file has been updated correctly? I have made the mistake of not including the prefix to my username and database sometimes, for example, `frank_frank` and `frank_invisioncommunity`. I would also ensure the permissions are correct for the username associated with your database. Frank S. Hagan 1
Frank S. Hagan Posted July 23 Author Posted July 23 2 hours ago, Gary said: Hi @Frank S. Hagan, Are you definite the `config_global.php` file has been updated correctly? I have made the mistake of not including the prefix to my username and database sometimes, for example, `frank_frank` and `frank_invisioncommunity`. I would also ensure the permissions are correct for the username associated with your database. Thanks for the response! I have tried it several different ways. For WordPress sites on this server the database name is used without the account name for the connection to work. But using 'frank_invisioncommunity' and 'invisioncommunity' both generate the error. That's combined with trying the username alone and the username with the account prefix. In a terminal session I can log into the MariaDB system with the username and password and "show databases" and see the ones I've created and tried. PHP is also not throwing any errors now (that was a permission problem on a file). My conf_global.php file does show 'mysql' as the sql driver, but it's MariaDB. Same as on the prior server, so I don't think that matters. I'm sure it's something I've overlooked. If you see anything in the image that looks off let me know.   Â
Marc Posted July 23 Posted July 23 In the case of this one, the error is very specific and coming from your mysql instance. Its denying access to that user on that database. So something is wrong in that access. It may be that it doesnt have permission at all, or it doesnt have the correct level of permissions (it should be able to fully read and write to that database) Frank S. Hagan 1
Frank S. Hagan Posted July 23 Author Posted July 23 Thanks to both of you! I really appreciate the help. The advice definitely helped me focus. It looks like running through everything again, permissions, password, etc. solved the issue! Not sure which change actually corrected it. The only changes I made to conf_global.php were to remove the prefix from both the 'sql_database' and 'sql_user'. And I thought I tried using both 'sql_database' and 'sql_user' without prefixes before, but maybe not? Anyway, thanks! Gary 1
Recommended Posts