title: Gerrit Installation On Windows 7 Tomcat and Mysql Error - MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=26' at line 1
body: <p>I have installed and configured <strong>Gerrit</strong> on windows using <strong>Apache Tomcat</strong> and <strong>MySql</strong>. I followed the instructions found <a href="https://scn.sap.com/docs/DOC-42271" rel="nofollow noreferrer">here</a>. However the configurations were sucessful the database was created and it was deployed to tomcat however when i run the application i am getting Code Review Error - 500 Internal Server Error.</p>
  
  <p>I am not sure why this is happening or if this is normal once no projects have been created in <strong>Gerrit</strong>. Under is a screen shot of the error. The error logs on Apache Tomcat does not have any errors.</p>
  
  <p><img src="https://i.stack.imgur.com/ew3gV.jpg" alt="enter image description here"></p>
  
  <p><strong>Tomcat error log</strong></p>
  
  <p>I am using MySql Administrator 1.2.17 and mysql-connector-java-5.1.27</p>
  
  <pre><code>[2013-12-12 11:21:00,341] ERROR com.google.gerrit.httpd.restapi.RestApiServlet : Error in GET /changes/?n=25&amp;O=1
  com.google.gwtorm.server.OrmException: fetch failure on changes
      at com.google.gwtorm.schema.sql.SqlDialect.convertError(SqlDialect.java:152)
      at com.google.gwtorm.jdbc.JdbcAccess.convertError(JdbcAccess.java:448)
      at com.google.gwtorm.jdbc.JdbcAccess.queryList(JdbcAccess.java:146)
      at com.google.gerrit.reviewdb.client.Change_Access_changes_GwtOrm$$13.allOpenNext(Unknown Source)
      at com.google.gerrit.server.query.change.SqlRewriterImpl$11.scan(SqlRewriterImpl.java:291)
      at com.google.gerrit.server.query.change.SqlRewriterImpl$PaginatedSource.scan(SqlRewriterImpl.java:645)
      at com.google.gerrit.server.query.change.SqlRewriterImpl$ChangeSource.read(SqlRewriterImpl.java:608)
      at com.google.gerrit.server.query.change.AndSource.readImpl(AndSource.java:110)
      at com.google.gerrit.server.query.change.AndSource.read(AndSource.java:94)
      at com.google.gerrit.server.query.change.QueryProcessor.queryChanges(QueryProcessor.java:259)
      at com.google.gerrit.server.query.change.QueryChanges.query0(QueryChanges.java:158)
      at com.google.gerrit.server.query.change.QueryChanges.query(QueryChanges.java:146)
      at com.google.gerrit.server.query.change.QueryChanges.apply(QueryChanges.java:113)
      at com.google.gerrit.server.query.change.QueryChanges.apply(QueryChanges.java:42)
      at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:306)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
      at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:278)
      at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:268)
      at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:180)
      at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
      at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:70)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:113)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:64)
      at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:57)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75)
      at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
      at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120)
      at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:132)
      at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:129)
      at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:206)
      at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:129)
      at com.google.gerrit.httpd.WebAppInitializer.doFilter(WebAppInitializer.java:108)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
      at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617)
      at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1760)
      at java.lang.Thread.run(Thread.java:744)
  Caused by: 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 'OPTION SQL_SELECT_LIMIT=26' 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:526)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
      at com.mysql.jdbc.Util.getInstance(Util.java:381)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1031)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1837)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1961)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2537)
      at com.mysql.jdbc.StatementImpl.executeSimpleNonQuery(StatementImpl.java:1463)
      at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1875)
      at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
      at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
      at com.google.gwtorm.jdbc.JdbcAccess.queryList(JdbcAccess.java:134)
      ... 45 more
  </code></pre>