Added proper error message output to MySQL errors