added mysql plugin, refactored console interface

 Added mysql setup, sql scripts running.