简体   繁体   English

查询所有数据库时,Mysql 数据库未显示在 mysql 工作台中

[英]Mysql database not showing up in mysql workbench when querying all databases

I created a schema in mySQL called ASSIST_DB which is not showing up as a database.我在 mySQL 中创建了一个名为 ASSIST_DB 的模式,它没有显示为数据库。 I tried connecting mysql to c# in VS 2019, but I believe the database name is the problem, as the connection always fails.我尝试在 VS 2019 中将 mysql 连接到 c#,但我相信数据库名称是问题所在,因为连接总是失败。 I queried the database connection, and it shows names of other databases and not my schema.我查询了数据库连接,它显示了其他数据库的名称,而不是我的架构。 I did google what a schema was, and it does differ from a database, but I believe that that is the database, and I do not imagine why it does not show up.我确实谷歌了架构是什么,它确实与数据库不同,但我相信那是数据库,我不知道为什么它没有出现。 My c# connection code is as follows:我的c#连接代码如下:

 //Initialize values
    private void Initialize()
    {
        server = "localhost";
        database = "ASSIST_DB";
        uid = "root";
        password = "CHANGED IT TEMPORARILY";
        string connectionString;
        connectionString = @"SERVER=" + server + ";" + "DATABASE=" +
        database + ";" + "UID=" + uid + ";" + "PASSWORD= " + password + ";";

        connection = new MySqlConnection(connectionString);
    }

I have uploaded a few images to make the situation clearer:我上传了几张图片以使情况更清楚:

My assist db schema我的协助数据库架构

it does not show my assist_db它没有显示我的 assistant_db

connection is working连接正常

I managed to solve it.我设法解决了它。 I had made a local model that was not part of my server's schemas, and had to remake the table in the server.我制作了一个本地 model ,它不属于我的服务器架构的一部分,并且不得不重新制作服务器中的表。 I copied the sql code from the model I created to move the tables over.我从创建的 model 复制了 sql 代码以移动表格。 It is working perfectly now.它现在运行良好。

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

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