MySQL Error 1044 — Database Access Denied

Website URL

http://zsuites9999615230.free.nf/hotel-z-suites-standalone-v2/

Error Message

Hello InfinityFree Support,

My Hotel Z Suites website cannot connect to my existing MySQL database.

The database is accessible through phpMyAdmin and contains three tables: admins, enquiries, and rooms.

My PHP website returns this error:

SQLSTATE[HY000] [1044] Access denied

My connection details are:

Hostname: sql301.infinityfree.com

Username: if0_43051022

Database: if0_43051022_suiteswebsitedatabase

I have verified that the password in my website configuration matches the current MySQL password in the hosting panel. The database connection still fails.

Please check the database user’s permissions and investigate why this user cannot access the existing database.

Thank you.

Other Information

http://zsuites9999615230.free.nf/hotel-z-suites-standalone-v2/

Welcome to the InfinityFree community forum! Good to have you here.

  • Most people answering here are volunteers. They’re often the fastest source of help. Admin (the only staff member) checks in about once a day for issues on our end.
  • Volunteers can’t see your account or website. Share what you actually see, like error messages and what happens when you try something. That’s more useful than your theory of what’s wrong.
  • AI tools often get InfinityFree wrong. If a volunteer’s advice differs from what an AI told you, please try the volunteer’s suggestion first.
  • Solving an issue is a joint effort. Try the suggestions you get and report back what happened.

Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.

It sounds like the database name in your config doesn’t exactly match the one in the control panel. I can’t see your list of databases, so I can’t confirm that. Could you copy the database name from the MySQL Databases section of the control panel and compare it, character by character, with the one in your website configuration? Then post the full error message exactly as PHP prints it, including the part after “Access denied for user”.

I think this because another recent topic had the same 1044 error with a user that could open the database in phpMyAdmin. In that topic, a reply said the database name in the config was misspelled. The real one had two letters swapped. The same reply said the knowledge base lists a wrong database name as the most common cause of this error.

The topic is here:

In another topic, the poster found the same mistake in their config.php:

That’s only a lead. Your database name may well be right, and the full error text should help show whether it is.

I checked your website but I don’t see any database error. Is there any way to trigger that error on the website?