Add support for alternate ports on MySQL databases
WebMatrix currently supports deployment to MySQL databases that uses the standard 3306 port.
Even if you use a connection string including the "Port" variable, it is ignored and configuration proceeds using 3306.
It would be useful for people who use alternate ports for security purposes if we could deploy sites as currently this has to be worked around using alternate network configurations.
The webdeploy package we use from wordpress doesn include the port for the database connection string as a parameter that can be changed at publish time. This was an oversight, and we’re going to work to get this updated. In the interim, you can modify the port in wp-config.php, publish with the port set, and then switch back to your local MySQL port. We know this is less than ideal, and we’re looking into it.
Could you allow a port number to be specified in IDE?
Javier Berezovsky commented
More information on the topic:
WebMatrix will use the connection string to test connectivity so the test connection actually goes to the port specified.
It does not, however configure the sites to use this data, so the published page will still attempt to connect on port 3306.
The only way to work around this issue is to either lower security by using the standard port, or configure network address translation to force traffic to port 3306 from the content server to the MySQL server to go to your alternate port.