title: Can I execute multiple queries separated by semicolon with MySQL Connector/J?
body: <p>My jdbc driver for mysql db is of version 5.1.25.</p>
  
  <p>I want to execute sql query like so:</p>
  
  <pre><code>statement.execute("select fullName from user where user_id=1; select fullName from user where user_id=2");
  </code></pre>
  
  <p>And I always receive exception:</p>
  
  <pre><code>Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.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 'select fullName from user where user_id=2' at line 1
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
      at com.mysql.jdbc.Util.getInstance(Util.java:386)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2809)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2758)
      at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:894)
      at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:732)
      at dbViewer.model.UserConnectionManager.retrieveRoutinesNames1(UserConnectionManager.java:622)
      at dbViewer.model.UserConnectionManager.main(UserConnectionManager.java:637)
  </code></pre>
  
  <p>BUT when I run this same query(separated by semicolon) from command line it works perfectly and outputs two tables as expected.</p>