I was wondering whether there is a way to define a specific database in the connection setup of MySQL Workbench (I know this works with other database software). Sometimes I have a lot of different databases on one server and I only want to access one with one connection. Can I specify the database in the connection settings somehow?
我想知道在MySQL Workbench的连接设置中是否有一种方法来定义一个特定的数据库(我知道这可以与其他数据库软件一起工作)。有时,我在一台服务器上有很多不同的数据库,我只想用一个连接访问一个数据库。我可以以某种方式在连接设置中指定数据库吗?
1 个解决方案
#1
2
YES, On the home tab Click the +
in MySQL Connections
. And put the database name in the Default Schema:
when you fill in all the usual info about ip address etc
是的,在home选项卡上单击MySQL连接中的+。并将数据库名放在默认模式中:当您填写所有关于ip地址等的常见信息时
Now if you only want to see the one database, then create a new MySQL user account and only allow this new account access to this single database. Then change the connection to the database to use the newly created MySQL account.
现在,如果您只想查看一个数据库,那么创建一个新的MySQL用户帐户,并只允许这个新帐户访问这个数据库。然后更改到数据库的连接,以使用新创建的MySQL帐户。
I guess you are seeing all the databases because you are using the root
account.
我猜您看到所有的数据库是因为您正在使用根帐户。
#1
2
YES, On the home tab Click the +
in MySQL Connections
. And put the database name in the Default Schema:
when you fill in all the usual info about ip address etc
是的,在home选项卡上单击MySQL连接中的+。并将数据库名放在默认模式中:当您填写所有关于ip地址等的常见信息时
Now if you only want to see the one database, then create a new MySQL user account and only allow this new account access to this single database. Then change the connection to the database to use the newly created MySQL account.
现在,如果您只想查看一个数据库,那么创建一个新的MySQL用户帐户,并只允许这个新帐户访问这个数据库。然后更改到数据库的连接,以使用新创建的MySQL帐户。
I guess you are seeing all the databases because you are using the root
account.
我猜您看到所有的数据库是因为您正在使用根帐户。