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

Connected database not showing #668

Closed
gottogethelp opened this issue Jul 25, 2020 · 6 comments
Closed

Connected database not showing #668

gottogethelp opened this issue Jul 25, 2020 · 6 comments
Labels

Comments

@gottogethelp
Copy link

gottogethelp commented Jul 25, 2020

Describe the bug:

Connected database not showing

Steps to reproduce the behavior:

Click Add new connection
Click MySQL
Click TEST CONNECTION - says Successfully connected
Click SAVE CONNECTION - says:

capra was added to your settings!
Review JSON Syntax
{
  "database": "belgarath",
  "driver": "MySQL",
  "mysqlOptions": {
    "authProtocol": "default"
  },
  "name": "capra",
  "password": "root",
  "port": 3306,
  "previewLimit": 50,
  "server": "localhost",
  "username": "root"
}

Click CONNECT NOW - displays a new tab:

image

Expected behaviour:
Should see my connection in CONNECTIONS but it's not there:

image

Hitting refresh gets me:

image

in the bottom right hand corner.

Desktop (please complete the following information):

SQLTools Version 0.22.11
VSCode Version: 1.47.2
OS: [e.g. Windows, Linux, Mac]
Driver: MySQL

Database version: 8.0

Additional context Add any other context about the problem here.

I had successfully installed the SQLTools and SQLTools MySQL/MariaDB extensions and they were working fine. However, I had some issues elsewhere so I'd temporarily uninstalled them whilst trying to bug fix.

I've now added them back and reconnected my MySQL database - everything in the connection process, including testing the connection, looked fine. However, it says No connections found. I've tried a few times with different databases and always the same result - connection process looks fine but no end result.

Weirdly, whenever I click on the refresh button icon then a message pops up in the bottom right of the screen to say Element with id capra|MySQL|localhost|belgarath is already registered. It always says this and never refers to any other database. This is the first database I tried to connect to originally. It also appeared when on the very first reinstall so somewhere it had remembered those settings.

@mtxr
Copy link
Owner

mtxr commented Jul 25, 2020

which VSCode version are you using? is it a remote development setup? are you connecting to docker database?

Can you provide more info? If possible, follow the template here: https://github.com/mtxr/vscode-sqltools/blob/master/.github/ISSUE_TEMPLATE/bug_report.md so I can try to reproduce it here.

@gottogethelp
Copy link
Author

Hi. Updated comment

@aetherealtea
Copy link

Encountered the exact same behavior.

SQLTools Version 0.23.0
VSCode Version: 1.48.2
OS: Ubuntu 18.04
Driver: MSSQL

I have previously created a similar db connection and deleted SQLTools, after the new installation I'm getting this error too.

@savvo
Copy link

savvo commented Dec 10, 2021

I've just run across the same. It seems "Add new connection" doesn't check for duplicate entries, allowing e.g.

    "sqltools.connections": [
        {
            "mysqlOptions": {
                "authProtocol": "default"
            },
            "previewLimit": 50,
            "server": "localhost",
            "port": 3306,
            "askForPassword": true,
            "driver": "MySQL",
            "name": "heretic",
            "database": "default",
            "username": "root"
        },
        {
            "mysqlOptions": {
                "authProtocol": "default"
            },
            "previewLimit": 50,
            "server": "localhost",
            "port": 3306,
            "askForPassword": true,
            "driver": "MySQL",
            "name": "heretic",
            "database": "default",
            "username": "root"
        }
    ]

and resulting in:

Element with id heretic|MySQL|localhost|default is already registered

Worked around it by editing settings.json

@TomPohys
Copy link

TomPohys commented Dec 14, 2021

I was able to delete duplicated connection by Command Palette (Ctrl + Shift + P) -> SQLTools Management: Delete connection. Then the rest of the connection shows up

@gjsjohnmurray
Copy link
Collaborator

Starting with today's 0.27.1 release it should no longer be possible to define connections with duplicate IDs using the UI.

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

No branches or pull requests

6 participants