Added reconnect to mysql

@wachterjohannes Here could you at least check the exception code.