Fala pessoal, estou tentando conectar no banco de dados só que dá este erro, detalhe só estou tentando conectar não estou dando nenhum select nem nada...
se alguém puder ajudar....
segue o código:
import java.sql.*;
public class hi_there {
public static void main(String[] args) throws SQLException {
Connection con = null;
try{
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://200.220.148.207:3306/moodle200_190", "root", "abcabc" );
con.close();
System.out.println("Conectado");
} catch (ClassNotFoundException e){
e.printStackTrace();
} catch (SQLException e){
e.printStackTrace();
}
}
}
o erro que dá é este:
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '????????????????' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1051)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3562)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2690)
at com.mysql.jdbc.ConnectionImpl.configureClientCharacterSet(ConnectionImpl.java:1862)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3596)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2202)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:787)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:353)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(libgcj.so.90)
at hi_there.main(hi_there.java:34)