Error establishing a db connection and http 500
-
Hi,
I’m trying to setup WordPress on a self-hosted server that must be internal.
Windows Server 2008 R2
IIS 7.5
PHP 7.2.7
MySQL 8.0.11
MS VC++ 2015 x64 14.0.23026After going through a couple different guides online, I have IIS running with handler mappings including php using the fastcigmodule.
When going to the internal site: http://wp-projects/wp-admin/install.php, I receive an error: Error establishing a database connection. I have checked that the db exists through:
show databases;
I am able to login as both root and the newly created “wpuser” through MySQL 8.0 Command Line Client and from the terminal by navigating to mysql’s path and using:
mysql -uroot -p
Running netstat -an shows that all interfaces are listening on 3306
So the db exists, the mysql user(s) are able to login directly and mysql listens as expected.
A potentially related problem is that http://wp-projects/phpinfo.php runs correctly. However, http://wp-projects/testconn.php does NOT work resulting in HTTP 500 Internal Server Error. The code is:
<?php
$test Connection = mysql_connect(‘localhost’, ‘root’, ‘password’);
if (!$testConnection) {
die(‘Error: ‘ . mysql_error());
}
echo ‘Database connection working!’;
mysql_close($testConnection);
?>- This topic was modified 7 years, 4 months ago by .
- This topic was modified 7 years, 4 months ago by . Reason: minor edits
The page I need help with: [log in to see the link]
The topic ‘Error establishing a db connection and http 500’ is closed to new replies.