MyBB Community Forums

Full Version: SQL Error: Access denied - wrong host IP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We're moving our myBB forum to a new host. Whereas before the database hostname was simply 'localhost', the mysql database is on a different server now.

I put the IP address of the server in the config.php file, in the $config['database']['hostname'] variable.

Now I still get the error:
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1045 - Access denied for user 'XXXX_mybb'@'XX.XXX.XXX.2' (using password: YES)
Query:
[READ] Unable to connect to MySQL server

(I X'ed out some things)

The problem is that the 'XX.XXX.XXX.2' mentioned is NOT identical to the variable entered in the config file. The actual hostname has two additional numbers, e.g. 'XX.XXX.XXX.234', so the WRONG host is reported in the error message, which makes me think that this might be the cause of the problem in the first place, somehow.

Any idea why this may be happening?
Are you sure that the user has enough privileges to access the DB?
https://dev.mysql.com/doc/refman/5.5/en/...users.html
I checked in phpMyAdmin, and this particular user has 'ALL PRIVILEGES' for this particular database.

UPDATE:

After talking with my host about it for more than an hour, eventually recreating the user and password etc. fixed it. There must have been a typo somewhere in the creation of the database. But the good thing is that it is now fixed.