I have a mysql database that I am trying to retrieve from our website host (godaddy). I followed a format that seems to be right but it tells me that:
java.
I had the same problem.
Just run one more query (before your 'SELECT' statement) to connect to your database.
First:
sql = "USE "; ResultSet rs = stmt.executeQuery(sql);
And after:
sql = "SELECT * FROM item_master"; rs = stmt.executeQuery(sql);