Class implement a private messaging system that stores messages in a MySQL database.