Issue Summary
Error establishing database connection when trying to connect to remote database.
Here’s what I do.
I have 3 machines I work from, a Chromebox, a Chromebook, and a Windows laptop.
I have Local installed on all 3, I create an identical WP site on all 3, and using Git, I push/pull the theme folder so I can work on the same website, from whichever device I happen to be on.
The only problem with this setup is the database. So, rather than using a local DB for each one and moving around an SQL file everytime I go from one device to another, I just want to connect to one database that all 3 sites would share.
This works swimmingly on my Chromebooks, but for some reason the Windows machine will not connect to the remote database. It’s not the wp-config file I’ve checked and re-done that too many times to count.
I’m not a computer guy but my guess is there’s some kind of port conflict? I haven’t used Windows in years I just recently got this computer from work so I’m pretty clueless here, but I’m willing and able to follow instructions =]
Troubleshooting Questions
Happens for any site I create in Local, on this particular Windows machine. Does NOT happen on my two Chromebooks. They work just fine, on the same network. I also was able to connect to the DB using something called HeidiSQL so the issue isn’t my computer, it’s specifically Local, on this computer. Local works fine on my other computers, and HeidiSQL works fine on the Windows laptop, but for some reason Local on the Windows laptop will not connect to the DB.
Replication
Create WP Site in Local
Edit wp-config.php to point to my remote DB on my VPS instead of the local DB, like I’ve done a dozen times before on my Chromebooks
See “Error establishing connection to database” error.
System Details
-
Which version of Local is being used? Most recent, I just installed it a few days ago
-
What Operating System (OS) and OS version is being used? Windows 10
-
Attach the Local Log. See this Community Forum post for instructions on how to do so: done