This might help you You'll need the MySQL Connector/NET ADO.NET driver. Once installed, it behaves almost identically to Microsoft's native System.Data.SqlClient. Instead of importing that namespace, use MySQL's:
MySqlConnection DB = new MySqlConnection("SERVER=...");
Cygwin connecting to MySQL: Can't connect to local MySQL server through socket '/var/run/mysql.sock'
I hope this helps . You might try some of the following: DNS. You can use Route 53 (or any other DNS provider) to create DNS records that point to your current IP address of an instance. Secondary Elastic Network Interfaces can be moved from one instance to another so after an upgrade you could just move the NIC to the new production instance without changing any IP addresses.
Connecting to external mysql database with codeigniter running on a local nginx server