vscode-sqltools: MS SQL driver: I can get connection to a DB and run SQL but I cannot see list of tables
I can connect to a SQL DB (Azure SQL instance), run code, but when I try to expand the connection to see the list of tables, I get the error “Request connection/GetChildrenForTreeItemRequest failed unexpectedly without providing any details.”
I saw issues 640 and 642 but they apply to PostgreSQL. Could not use the solution.
My connection string: ` “sqltools.connections”: [
{
"mssqlOptions": {
"appName": "SQLTools",
"useUTC": true,
"encrypt": true
},
"previewLimit": 50,
"server": "<my db server>",
"port": 1433,
"driver": "MSSQL",
"name": "<my db name>",
"database": "<my db name>",
"username": "<user>",
"password": "<password>"
}
],`
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 17
- Comments: 45
https://stackoverflow.com/questions/50093144/mysql-8-0-client-does-not-support-authentication-protocol-requested-by-server/50131831#50131831
Execute the following query in MYSQL Workbench
ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’
Where root as your user localhost as your URL and password as your password
Then run this query to refresh privileges:
flush privileges;
Try connecting using node after you do so.
If that doesn’t work, try it without @‘localhost’ part.
Same issue here:
Environment VSCode: February 2021 (version 1.54) SQL Tools: V 0.2.0 OS: OS11.2.3 ( Apple silicon)
Error: Running the contributed command: ‘sqltools.getChildrenForTreeItem’ failed.
Here is the connection, it is fine, as it has the green dot for connected as well as the option to disconnect.
Here is my select to return data (So it is connecting fine)
@xenago I had the /GetChildrenForTreeItemRequest failed error for my azure cloud database; interestingly enough I changed the database to master like u did here and it’s working perfectly fine haha so thanks
If anyone is having trouble with mysql 8.0 and above, use this and it will work.
I face the same issue, when I drill down the Objects. I get back the database names but under the database when I click tables or views I get the error
Request connection/GetChildrenForTreeItemRequest failed with message: Cannot read property 'ResultSet' of undefinedWith the same connection I can run queries without any problem aginst an athena on AWS.
@xenago so your issue is the same as #714
Yes, it does list them:
After doing some checking, I think the issue is related to the selected Database for the connection:
I am only able to see tables in that database which has been selected for that connection, not any others accessible to that db login, despite them all being visible in the ui.
For example, when connecting to ‘master’, I can’t access anything:
But connecting directly to this other database, the schema becomes visible:
So maybe the ui should either hide these inaccessible databases (to make it clear that only a single database is usable per connection), or properly support accessing all of the user’s visible databases. The latter is how I would expect it to work since that’s how it works in SSMS, DBeaver, etc. However I don’t currently see an option in the ui to switch the active database within the connection, so that option may be too complex.
in my case the problem was solved by changing the hostname “localhost” by the local ip “127.0.0.1”