You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何开启多个SQL Workbench/J实例或连接至多个数据库实例?

Hey there! Let's walk through how to fire up multiple SQL Workbench/J instances and connect to multiple database instances without any hassle.

Running Multiple SQL Workbench/J Instances

SQL Workbench/J doesn’t restrict you to a single instance by default—here’s how to launch additional ones based on your OS:

Windows

  • If you already have one instance open, just double-click the SQL Workbench/J shortcut again (either on your desktop or from the Start Menu) to launch a second instance.
  • For command-line users: Open a new Command Prompt window, navigate to your SQL Workbench/J installation directory, and run SQLWorkbench.exe (or the executable name specific to your setup).

macOS

  • From Launchpad or the Applications folder, hold down the Option key while clicking the SQL Workbench/J icon—this will force a new instance to open.
  • Via Terminal: Run the command open -n /Applications/SQLWorkbenchJ.app (adjust the path if you installed it elsewhere). The -n flag tells macOS to open a new instance instead of focusing the existing one.

Linux

  • Re-click the SQL Workbench/J launcher from your application menu—most desktop environments will spawn a fresh instance automatically.
  • Command-line method: Open a new terminal window and run sqlworkbenchj (if it’s added to your system PATH) or execute the startup script directly, e.g., ./sqlworkbench.sh from the installation directory.
Connecting to Multiple Database Instances

You have two solid options here—either manage all connections in a single instance, or spread them across multiple instances:

Option 1: Manage Multiple Connections in One Instance

This is great if you want to switch between databases quickly without juggling windows:

  • Open SQL Workbench/J, then click the Connect icon in the toolbar (or go to File > Connect Window).
  • In the connection window, click New to create a new connection profile:
    1. Give it a descriptive name (like "Production PostgreSQL" or "Dev MySQL").
    2. Select the appropriate database driver for your target DB.
    3. Fill in the host address, port, database name, username, and password.
    4. Click Test to verify the connection works, then hit Save to store the profile.
  • Repeat this for every database you need to connect to. You’ll see all saved profiles in the connection window—double-click any to open it in a new tab. Switch between tabs to work with different databases.

Pro tip: Customize the connection color in the Advanced tab of the connection profile setup. This will color-code the tab for that connection, making it way easier to spot at a glance.

Option 2: Connect to Different Databases in Separate Instances

If you prefer to keep your database work completely isolated (e.g., running long queries on one DB while editing another), just:

  1. Launch multiple SQL Workbench/J instances using the methods above.
  2. In each instance, open the connection window and set up (or select) the specific database connection you want to use for that window.

内容的提问来源于stack exchange,提问作者Dinakar Ullas

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 17:07:40