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

Java JDBC Connection Error: unknown error: expecting "EOF" but got 'V' instead #990

Open
xlw712 opened this issue Jan 8, 2021 · 0 comments

Comments

@xlw712
Copy link

xlw712 commented Jan 8, 2021

hi
I use below code
docker run -itd --name git_base --env GITBASE_PASSWORD=root -p 3344:3306 -v /Users/code/test:/opt/repos srcd/gitbase:latest
and java jdbc connection gitbase mysql
Connection connection=JDBCUtils.getConnection("jdbc:mysql://127.0.0.1:3344/gitbase","root","root");
but print error
Exception in thread "main" java.sql.SQLException: unknown error: expecting "EOF" but got 'V' instead at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2526) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484) at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1446) at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3828) at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3268) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2278) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2064) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:790) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:395)
Is there any way to solve it? thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant