Vscode-sqltools: Not able to connect to docker mysql8 from sql tools with protocol tcp

Created on 3 Oct 2019  Â·  5Comments  Â·  Source: mtxr/vscode-sqltools

Describe the bug
I am trying to connect to mysql8 running on docker instance from VSCode sqltools. The error is:
Connection String: Server=localhost;Database=test;Uid=user;Pwd=user;Protocol=tcp;Port=3307
Docker is running on my localhost on port 3307
1f2898611348 mysql/mysql-server "/entrypoint.sh mysq…" 6 days ago Up About an hour (healthy) 33060/tcp, 0.0.0.0:3307->3306/tcp mysql

ERROR:
INFO: Executing SQLTools.selectConnection
ERROR: Error: { [Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at /Users/komal/.vscode/extensions/mtxr.sqltools-0.21.0/extension.js:1:22985
at /Users/komal/.vscode/extensions/mtxr.sqltools-0.21.0/extension.js:1:23392
at Immediate.module.exports.messageQueue.size.setImmediate (/Users/komal/.vscode/extensions/mtxr.sqltools-0.21.0/extension.js:1:23936)
at runCallback (timers.js:694:18)
at tryOnImmediate (timers.js:665:5)
at processImmediate (timers.js:647:5)] code: -32001, data: { dialect: 'MySQL', dialectOptions: {} } }
INFO: Executing SQLTools.openEditConnectionScreen
INFO: Executing SQLTools.showOutputChannel
INFO: Executing SQLTools.testConnection

Able to connect to the same from command line on vm.
mysql -h localhost -u user -puser -P 3307 --protocol=tcp

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...' create a docker instance of mysql8
  2. Click on '....' from VSCode connected to VM which is running docker.
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • SQLTools Version [e.g. v0.17.x] mysql Ver 14.14 Distrib 5.7.27, for Linux (x86_64) using EditLine wrapper
  • VSCode Version: [e.g 1.x.y] 1.38
  • Dialect Used/Version: [e.g PostgreSQL 9, Oracle CE, SQLite, MySQL 6, Redshift..] MYSQL
  • OS: [e.g. Windows, Linux, Mac] Linux.

Additional context
Add any other context about the problem here.

invalid

Most helpful comment

@Maransatto Searching the repo for maxIdleTime, I found this.

Not setting a connection timeout results in NaN being computed for pooling.maxIdleTime.

Just setting a timeout in the connection configuration fixes the problem.

All 5 comments

This is already described here: https://vscode-sqltools.mteixeira.dev/driver/mysql#mysql-8-and-er_not_supported_auth_mode

This is already described here: https://vscode-sqltools.mteixeira.dev/driver/mysql#mysql-8-and-er_not_supported_auth_mode

Hi.
I've tried to follow these instructions, but now I got the following error

Error opening connection Client option 'pooling.maxIdleTime' does not support value 'NaN'.

Note: I'm also using docker but my port is now 3307, so I've tried 33070.

@Maransatto Searching the repo for maxIdleTime, I found this.

Not setting a connection timeout results in NaN being computed for pooling.maxIdleTime.

Just setting a timeout in the connection configuration fixes the problem.

Followed all instructions above: used xprotocol, defined connection timeout, set up user to connect on localhost with password and all I get at the end is server has gone away. Using MySQL 8

Followed all instructions above: used xprotocol, defined connection timeout, set up user to connect on localhost with password and all I get at the end is server has gone away. Using MySQL 8

Me too ...
How to solve it ??

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sideshow-systems picture sideshow-systems  Â·  4Comments

Maransatto picture Maransatto  Â·  3Comments

cstyve picture cstyve  Â·  3Comments

xenoterracide picture xenoterracide  Â·  5Comments

ntt2k picture ntt2k  Â·  4Comments