Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql 5 connection error. #10066

Closed
liudonghua123 opened this issue Dec 20, 2023 · 3 comments
Closed

mysql 5 connection error. #10066

liudonghua123 opened this issue Dec 20, 2023 · 3 comments
Labels
a/data/mysql k/bug Something isn't working

Comments

@liudonghua123
Copy link

liudonghua123 commented Dec 20, 2023

Version Information

Server Version: 2.36.0
CLI Version (for CLI related issue):

Environment

OSS

What is the current behaviour?

When I tried to add mysql database using mysql8 driver using the JDBC connection URL like jdbc:mysql://<hostname>:<port>/<database name>?user=<username>&password=<password> from https://hasura.io/docs/latest/databases/mysql/cloud/, I got the following detailed errors.

If I change to mariadb driver, the similar errors shown.

The mysql I tried to connect is 5.7.40-log MySQL Community Server (GPL).

What is the expected behaviour?

No problems when add new databases

How to reproduce the issue?

N.A.

Screenshots or Screencast

Please provide any traces or logs that could help here.

Error Details
[
	{
		"definition": "nocodb_ir_assets",
		"message": {
			"stacktrace": "java.sql.SQLSyntaxErrorException: 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 '(CONVERT(x'5b5d' USING utf8), '$[*]' COLUMNS(schemaname VARCHAR(255) PATH '$.s',' at line 14\n\tat com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\n\tat com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\n\tat com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916)\n\tat com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:972)\n\tat io.agroal.pool.wrapper.PreparedStatementWrapper.executeQuery(PreparedStatementWrapper.java:78)\n\tat io.opentelemetry.instrumentation.jdbc.internal.OpenTelemetryStatement.wrapCall(OpenTelemetryStatement.java:294)\n\tat io.opentelemetry.instrumentation.jdbc.internal.OpenTelemetryPreparedStatement.executeQuery(OpenTelemetryPreparedStatement.java:60)\n\tat io.hasura.services.schemaGenerators.MySQLSchemaGenerator.queryDatabase(MySQLSchemaGenerator.kt:106)\n\tat io.hasura.services.schemaGenerators.BaseSchemaGenerator.getSchema(BaseSchemaGenerator.kt:36)\n\tat io.hasura.services.dataConnectors.MySQLDataConnectorService.executeGetSchema(MySQLDataConnectorService.kt:65)\n\tat io.hasura.services.dataConnectors.BaseDataConnectorService.getSchema(BaseDataConnectorService.kt:127)\n\tat io.hasura.services.dataConnectors.MySQLDataConnectorService_Subclass.getSchema$$superforward(Unknown Source)\n\tat io.hasura.services.dataConnectors.MySQLDataConnectorService_Subclass$$function$$7.apply(Unknown Source)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:73)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:62)\n\tat io.quarkus.opentelemetry.runtime.tracing.cdi.WithSpanInterceptor.span(WithSpanInterceptor.java:66)\n\tat io.quarkus.opentelemetry.runtime.tracing.cdi.WithSpanInterceptor_Bean.intercept(Unknown Source)\n\tat io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:30)\n\tat io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:27)\n\tat io.hasura.services.dataConnectors.MySQLDataConnectorService_Subclass.getSchema(Unknown Source)\n\tat io.hasura.controllers.DataConnectorResource.getSchemaWithRequest(DataConnectorResource.kt:106)\n\tat io.hasura.controllers.DataConnectorResource_Subclass.getSchemaWithRequest$$superforward(Unknown Source)\n\tat io.hasura.controllers.DataConnectorResource_Subclass$$function$$4.apply(Unknown Source)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:73)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:62)\n\tat io.quarkus.opentelemetry.runtime.tracing.cdi.WithSpanInterceptor.span(WithSpanInterceptor.java:66)\n\tat io.quarkus.opentelemetry.runtime.tracing.cdi.WithSpanInterceptor_Bean.intercept(Unknown Source)\n\tat io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)\n\tat io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:30)\n\tat io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:27)\n\tat io.hasura.controllers.DataConnectorResource_Subclass.getSchemaWithRequest(Unknown Source)\n\tat io.hasura.controllers.DataConnectorResource$quarkusrestinvoker$getSchemaWithRequest_23559ea216097e1aa0363aaaee9f7b60beabc35c.invoke(Unknown Source)\n\tat org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)\n\tat io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)\n\tat org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)\n\tat io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)\n\tat org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)\n\tat org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)\n\tat org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)\n\tat org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)\n\tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\n\tat java.base/java.lang.Thread.run(Thread.java:840)\n"
		},
		"name": "source nocodb_ir_assets",
		"reason": "Inconsistent object: 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 '(CONVERT(x'5b5d' USING utf8), '$[*]' COLUMNS(schemaname VARCHAR(255) PATH '$.s',' at line 14",
		"type": "source"
	}
]

Any possible solutions/workarounds you're aware of?

Keywords

mysql database

@liudonghua123 liudonghua123 added the k/bug Something isn't working label Dec 20, 2023
@liudonghua123
Copy link
Author

If I tried to connect to mysql 8, it's ok. So maybe let the mysql driver to compatible with mysql 5+ would be better.

@liudonghua123 liudonghua123 changed the title mysql connection error. mysql 5 connection error. Dec 20, 2023
@codedmart
Copy link
Contributor

@liudonghua123 we do only support MySQL 8+. This is called out in our docs here under “Supported Versions”. Happy for feedback on how you would have found this information more readily available. Thanks!

@liudonghua123
Copy link
Author

Thanks for the link you mentioned, I didn't fully read the docs. I also noticed that mysql 5 is reaching its EOF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/data/mysql k/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants