* 此功能适用于不同IP,相同数据库,相同的分组,例如主从数据库
1、打开 “菜单栏 - 工具 - 选项“ 窗口,找到MySQL的配置文件目录 “D:\用户目录\我的文档\Navicat\Premium\profiles”(不同电脑可能不同)
2、打开vgroup.json 文件,各字段名释义如下
{
"version": "1.1",
"vgroups": [ // 连接分组
{
"vgroup_name": "测试服务器", // 组名
"vgroup_type": "CONNECTION", // 组类型
"items": [ // 该组下的多个连接
{
"name": "localhost",
"type": "CONNECTION",
"server_type": "MYSQL"
}
]
}
],
"connections": [ // 数据库分组
{
"conn_name": "localhost", // 连接名
"conn_type": "MYSQL",
"catalogs": [
{
"catalog_name": "default",
"schemas": [
{
"schema_name": "db_name", // 数据库名
"vgroups": [
{
"vgroup_name": "group_name", // 组名
"vgroup_type": "TABLE", // 表的分组
"items": [
{
"name": "table_name", // 表名
"type": "TABLE" // 表类型
}
]
},
{
"vgroup_name": "group_name", //
"vgroup_type": "VIEW", // 视图的分组
"items": [
{
"name": "view_name",
"type": "VIEW"
}
]
}
]
}
],
"vgroups": []
}
],
"vgroups": []
}
]
}
3、相同的配置,复制粘贴