In a few circumstances you may have to connect the MySQL Database from the local machine to web hosting server, following is the script you can use for the same. Remember you need to have the following information with you
1. Database URL and
2. Java applet – ‘com.mysql.jdbc.Driver’ – to connect it.
Now you can use the following script to connect MySQL database which is hosted remotely.
<!- Database connection settings ->
<property name=”connection.url”>jdbc:mysql://localhost[serverIP ]/database_name</property>
<!- configuration pool via c3p0->