I wrote the application that uses a MySQL server. But we didn't want to have the users have to configure the client software. In my code I search for the server at start up as well as during the run if the connection is lost the search is done again.

There was no failover implemented at the server level.