con=DriverManager.getConnection(“jdbc:mysql://localhost:3306/mydatabase?useUnicode=true&characterEncoding=gb2312","root","root"); 改成这样试试另外写成:Class.forName("com.mysql.jdbc.Driver").newInstance()