MyBB Community Forums

Full Version: Can't Get MyBB to Connect to remote SQL Server
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was setting up MyBB via the installation wizard, and I got to the point where I was inputting the database information, and I encountered this message:

Quote:Error
There seems to be one or more errors with the database configuration information that you supplied:
  • Could not connect to the database server at 'my_database_ip' with the supplied username and password. Are you sure the hostname and user details are correct?
Once the above are corrected, continue with the installation.


I double and triple checked the information for the database and its all correct. I have the Hostname correct, the database name, the user name, password, etc.

After reading and re-reading posts on here about using a database that is not stored in the same place as the website, I noticed people configuring the database connection via the config.php file. I copied the information I put in the installation wizard fields, and still was unable to get passed the issue.

The articles that I read: Please note that I am new to all of this, and any help is appreciated and will go a long way.

**the hostname in the above message is a placeholder as to not post the ip address of the database
Is your DB server allowing external connexions to MySQL ?
Check the my.cnf to verify it allows that, and that your user (in MySQL) is allowed from the IP of your forum server.
(2021-01-07, 03:58 PM)Crazycat Wrote: [ -> ]Is your DB server allowing external connexions to MySQL ?
Check the my.cnf to verify it allows that, and that your user (in MySQL) is allowed from the IP of your forum server.
I will look into that and get back to you on what I find.

(2021-01-07, 03:58 PM)Crazycat Wrote: [ -> ]Is your DB server allowing external connexions to MySQL ?
Check the my.cnf to verify it allows that, and that your user (in MySQL) is allowed from the IP of your forum server.

Upon inspection of the my.ini (running Database via Xampp, and using PhPMyAdmin for database management), there is no indication that there is an IP blacklisting/whitelisting of any kind. Would I have to add a line to the my.ini file to account for this? (I assuming that all IPs/domains, other than localhost, are blocked by default unless specified otherwise)
For better understanding, what does your general webserver configuration looks like?

You mentioned XAMPP.
That means a bundled installation (Apache, PHP, MySQL etc) on the same host (probably on your local computer)

With a standard configuration of XAMPP, there should be no problems on a local host. Can you check the XAMPP configuration or let us know the details of what is set up.
For example, do you really use an external database server?

On a local computer there's no need to work with hostnames or IP addresses. Just leave any host as "localhost" to ensure a simple loopback.

For further help it is beneficial to know some details of your setup.

[ExiTuS]
(2021-01-07, 10:22 PM)[ExiTuS] Wrote: [ -> ]For better understanding, what does your general webserver configuration looks like?

You mentioned XAMPP.
That means a bundled installation (Apache, PHP, MySQL etc) on the same host (probably on your local computer)

With a standard configuration of XAMPP, there should be no problems on a local host. Can you check the XAMPP configuration or let us know the details of what is set up.
For example, do you really use an external database server?

On a local computer there's no need to work with hostnames or IP addresses. Just leave any host as "localhost" to ensure a simple loopback.

For further help it is beneficial to know some details of your setup.

[ExiTuS]

So here's the run down:
  1. The Server - A dedicated remote server hosted by ReliableSite.net
  2. The Website - Hosted by GoDaddy via the cloud
The database is on the dedicated server, so I cannot use localhost since the website is not on the same machine as the database. (I am using port 3305 since 3306 is being used by something else, I have configured the port listening with XAMPP already)

What I input into myBB installation wizard: 
[Image: mybbinfo.png]

Please let me know if you have any other questions Smile
the 3305, is that the port? Just to confirm, have you changed this as the default is usually 3306.
Further, ports should be defined as ip:port

so for example 192.168.1.100:3305

Just want to double check this. If your port is the default, remove the port number from your hostname and retry.