Title: Database connection issues
Last modified: August 21, 2016

---

# Database connection issues

 *  [jsl245](https://wordpress.org/support/users/jsl245/)
 * (@jsl245)
 * [12 years ago](https://wordpress.org/support/topic/database-connection-issues-1/)
 * So here is something of an odd issue. Last week (3 days ago) everything was working
   fine. I had to make a few changes to the wp-config.php file and to the xampp 
   server since I’m running IIS first and foremost and wordpress is essentially 
   just for learning purposes at this time. So I modified the port of the apache
   server to 81 and the MySQL server to 3307. wp-config had the line `define('DB_HOST','
   localhost:81');` and everything seemed to be working fine for several days, but
   after a weekend of the computer being off now I am having issues connecting to
   the database.
 * I have been looking around for solutions and have made the following changes:
    1. tried changing the wp-config.php line to `define('DB_HOST', 'localhost:3307');`
    2. Added /mysql/bin/mysql.exe to the allowed programs list in the firewall settings
    3. Added a specific allowed port (3307) in the firewall settings
    4. modified the my.ini file in xampp to use port 3307
    5. modified the /php/php.ini file to default the database to port 3307
 * None of these things seemed to work or change anything at all. I think it might
   have something to do with my xampp, which says “A MySQL server is not running
   or is blocked by a firewall!” on the [http://localhost:81/security/index.php](http://localhost:81/security/index.php)
   page. This is odd since the xampp control panel clearly shows that not only is
   MySQL running, but it is running on port 3307 just like I specified, and it is
   clear from my firewall changes that this should not be blocked in any way.
 * Does anyone have any clue what I’ve done wrong?

Viewing 1 replies (of 1 total)

 *  Thread Starter [jsl245](https://wordpress.org/support/users/jsl245/)
 * (@jsl245)
 * [12 years ago](https://wordpress.org/support/topic/database-connection-issues-1/#post-4955885)
 * So I fixed the whole “A MySQL server is not running or is blocked by a firewall!”
   issue by changing which port the security/index.php file was looking at to 3307.
   However the main issue of wordpress not finding the database still persists.

Viewing 1 replies (of 1 total)

The topic ‘Database connection issues’ is closed to new replies.

## Tags

 * [alternate port](https://wordpress.org/support/topic-tag/alternate-port/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [xampp](https://wordpress.org/support/topic-tag/xampp/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [jsl245](https://wordpress.org/support/users/jsl245/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/database-connection-issues-1/#post-4955885)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
