Support » Installing WordPress » No DB connectivity on IIS 10

  • I’ve been installing wordpress on multiple systems for a decade. This week, I tried to set it up on a Windows 2016 and a Windows 2019 server. The 2016 threw errors to hell and back, and then suddenly worked. The 2019 refuses to allow WordPress to run. Period. install.php was never able to create a wp_config, and the tables were never created in the db. Once I cleared that hurdle, I got “Error establishing a database connection” on the site and “One or more database tables are unavailable” on the admin side. Again, this site is self hosted, so “contact your ISP” means “look in a mirror.”

    I have:

    -Verified the NTFS permissions for IUSR – it can create files
    -Created the wp-config file with the correct, tested credentials
    -Created the tables manually using a script from this forum
    -Run the REPAIR script in wp-admin. It finds all the tables and says they’re OK.
    -Used both ‘localhost’ and ‘’ for the DB-HOST
    -Added ‘:3306’ to the hostname. Verified that that is the port MySQL is using.
    -Tried utf8 and utf8mb4 for collation. The tables are all utf8-general-ci
    -Logged into MySQLWorkbench using the wordpress credentials and added/dropped tables
    -Created a test page which connects to MySQL using the same credentials and accesses the DB. I runs fine.
    -Blown away the database and wp-config and tried again a few times

    Can anyone recommend a next step?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter swilsonhhcdfrs


    I’m not sure if this is a legitimate comment, since it includes a link to a spam website. Just stopping the MySQL server is not helpful, since that’s where the database lives. I had already attempted a restart, but that changed nothing. There is no problem with the MySQL server. I have tested it externally, and pages in IIS are capable of accessing it. Indeed, WordPress *is* accessing it, because it can run its repair script and find all the tables. So the server and credentials are working. Does anybody know enough about how that “Error Connecting to Database” message gets triggered to tell me what *else* might be the issue?

    Thread Starter swilsonhhcdfrs


    I blew away the DB and all files and attempted to install using Microsoft Web Platform Installer. That was a huge no-go, because A) the server only had IE installed as a browser, and it could not even load the page to get WPI downloaded. I had to install/use Chrome. B) WPI could not find the installed MySQL. I told it to run anyway. It ran for half an hour, but did nothing. I canceled it.

    I restarted the server in an attempt to get WPI to see MySQL 8. That did not work. BUT…

    I then put my WordPress files back (I had saved them) and recreated a blank DB. I accessed the localhost in Chrome and it worked this time.


    A) The server just needed a restart after MySQL 8 was installed? It did not ask for one, and I honestly don’t know if it was restarted.

    B) The security enhanced IE got in the way of the WordPress install, and it wanted Chrome.

    C) A fourth of fifth drop and recreate of the DB worked magic.

    D) WPI did *something* that got MySQL to be accessible from WordPress.

    I’m leaning towards ‘A.’ I do NOT recommend using Windows IIS for WordPress.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.