Fatal error: Uncaught mysqli_sql_exception: Access denied for user ‘if0_40160595’
I have already tried the following solutions without success:
I have double-checked that the password in my PHP configuration files is correct.
I have reset my main account password and updated the configuration files with the new password.
I have completely deleted the old database and all my website files, and then started fresh by creating a brand new database and re-uploading everything.
The “Access denied” error continues to happen. This strongly suggests there is a permission or provisioning issue on the server side with my MySQL user.
Could you please check and fix the MySQL user permissions for my account if0_40160595?
I checked your website and I now see an error saying that the database table is missing. This is progress, because it means that you can now successfully log in to the database.
Thank you for your help so far. I have done more testing, and I now have definitive proof that the problem is with the server configuration for my account.
Here are the results of my tests:
Test 1: Basic PHP Test
I created a file named test.php with only this code: <?php echo "Hello World"; ?>
Result: FAILURE. The page crashed with an HTTP ERROR 500.
Conclusion:
These tests prove that the server crashes on the line $conn = new mysqli(…). This means the PHP MySQLi extension is not working correctly on my hosting account. It is either disabled, misconfigured, or broken.
This is a server-level issue that I cannot fix myself. Could an administrator please investigate and repair the PHP MySQLi configuration for my account?
First of all, note that this is a public forum, so any details you share here are visible to everyone. That means, especially, DO NOT SHARE ANY SENSITIVE DETAILS SUCH AS PASSWORD HERE!
I have hidden the password in your message and reset your hosting account password for good measure.
The 500 error means that your code is crashing. But it doesn’t give any information why the code is crashing. To figure that out, please enable display_errors on your website to get an actual error message:
Note that you’ll also need to update the database password, since I reset it.
To go from “my code is crashing” to “the PHP extension is not working correctly” is a big leap in judgement that ignores a whole host of possible issues that you’re not even checking for.