When I use vscode extension SQL_tools to connect my local Mysql database, the connection is successful, but I can't see the tables that have been already stored in my database, the issue is "Running the contributed command: 'sqltools.getChildrenForTreeItem' failed.", How can I deal with it?
-
does the connection string contain a valid mysql account thatis allowed to see this database – RiggsFolly Feb 13 '21 at 11:35
-
@RiggsFolly I think my connection string valid with server address is localhost and port is 3306 – FrankWu07 Feb 14 '21 at 02:15
2 Answers
With me was because of the caching_sha2_password
. See if this post can help you: https://stackoverflow.com/a/50131831/15269357
I had the same problem too, and that's how I resolved

- 51
- 4
I also got the same issue ... try this out...it works for me
Delete the existing "MySQL connection" on which this error is occured in VSCode using right click "Delete Connection"
You will not loose any existing database or any table.
So create new "Add new connection" then select "MySQL connection" with same existing database on which this error is occuring. TEST it .Save connection and connect now. Thats it.You can see every databases and table again.
And always check on which database you are active in 'EDIT CONNECTION' while creating new database and table
Without DROPPING table it will not vanish from your database automatically in VScode. VSCODE has this type of bug that we can encounter.

- 1
- 2