Update mysql tests and fixed a connection not open issue with postgresql