简体   繁体   English

当我在 vscode 中通过 sql 连接 mysql 时,看不到数据库中的表

[英]Can't see tables in database when I connect the mysql by sql toos in vscode

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?当我使用vscode扩展SQL_tools连接我本地的Mysql数据库时,连接成功,但是我看不到已经存储在我的数据库中的表,问题是“运行贡献的命令:'sqltools.getChildrenForTreeItem'失败.",我该如何处理呢?

the issue apprear in the right corner of vscode问题出现在 vscode 的右上角

With me was because of the caching_sha2_password .和我在一起是因为caching_sha2_password See if this post can help you: https://stackoverflow.com/a/50131831/15269357看看这篇文章是否可以帮助你: https://stackoverflow.com/a/50131831/15269357

I had the same problem too, and that's how I resolved我也遇到了同样的问题,我就是这样解决的

Problem Solved just using some steps.仅使用一些步骤即可解决问题。

I also got the same issue and solved easily.我也遇到了同样的问题,很容易解决。

  1. Delete the existing " MySQL connection " on which this error is occured in VSCode using right click " Delete Connection "使用右键单击“删除连接”删除现有的“ MySQL连接”在VSCode中发生此错误

  2. You will not loose any existing database or any table.您不会丢失任何现有的数据库或任何表。

  3. So create new " Add new connection " then select " MySQL connection " with same existing database on which this error is occuring.因此,使用发生此错误的相同现有数据库创建新的“添加新连接”然后 select“ MySQL 连接”。 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.如果没有 DROPPING 表,它不会在 VScode 中自动从您的数据库中消失。 VSCODE has this type of bug that we can encounter. VSCODE 有我们可以遇到的这种类型的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM