HI,
i have made a connection with java and driver mysql in eclipse,all is ok but when i try to send a request to database,the response is very slow,it take more than 1 minute.
THANKS
package connection_mysql;
import java.sql.*;
` public class Main { private static Connection connect = null; private static Statement statement = null; private static PreparedStatement preparedStatement = null; private static ResultSet resultSet = null;
public static void main(String[] args) {
String pilote = "com.mysql.jdbc.Driver";
System.out.println("---------------------------");
try{
Class.forName(pilote);
System.out.println("---------1------------------");
connect = DriverManager.getConnection("jdbc:mysql://localhost/feedback?"
+ "user=sqluser&password=sqluserpw");
Statement statement = connect.createStatement();
ResultSet resultSet = statement
.executeQuery("select * from FEEDBACK.COMMENTS");
while(resultSet.next()){
System.out.println("---------------------------");
System.out.println("nom etudiant "+resultSet.getString("myuser"));
}
}catch(Exception e){
System.out.print("errooor"+e);
}
}
}
SELECT 1? - i486