Support MySQL and Refactoring.

Now support MySQL as the server database.