This class can access MySQL clusters using separate connections.
It takes an array with parameters to connect to different servers of a MySQL cluster with the distinction of being for read or write query servers.
The class checks the type of query being executed and route them to a read server if it is of the SELECT type or to a write server to INSERT, UPDATE and DELETE queries.
The class can also reconect to another MySQL available server if the current server that it attempted to access is down.
If any errors happen, the class sends an email message to an address configured for the respective cluster server. |