allredbm Posted July 11, 2021 Posted July 11, 2021 I have a MySql database set up on the johnny server and I'm trying to connect to it in a PHP-based webapp that I'm hosting locally with XAMMP. I've already added my local ip to Remote MySQL and added my user to the database. My config file looks like this: <?php // Database credentials define('DB_SERVER', 'johnny.heliohost.com'); define('DB_USERNAME', 'myusername'); define('DB_PASSWORD', 'mypassword'); define('DB_NAME', 'mydatabasename'); /* Attempt to connect to MySQL database */ $mysqli = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); // Check connection if($mysqli === false){ die("ERROR: Could not connect. " . $mysqli->connect_error); } ?> When I load the page, all of the mysqli queries fail with this error message: "Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server." Can anyone spot what I'm doing wrong? I've tried reading the documentation for information on how to connect remotely, but I wasn't able to get much from them.
OnEnemy Posted July 11, 2021 Posted July 11, 2021 This support request is being escalated to our root admins.
Krydos Posted July 11, 2021 Posted July 11, 2021 57 minutes ago, allredbm said: johnny.heliohost.com We aren't heliohost.COM we're heliohost.ORG. 1
allredbm Posted July 11, 2021 Author Posted July 11, 2021 That was the issue. I've fixed the server address and it's working now. Thank you!
Krydos Posted July 11, 2021 Posted July 11, 2021 Interestingly, the heliohost.com domain was registered 2 years before we existed, has never been used for anything, and has never been up for sale as far as we know. I suppose if they offered it to us at a reasonable price we would buy it because it is a common mistake that people put .com instead of .org.
Recommended Posts