Import MySQL connection settings from DBeaver, Sequel Ace, MySQL Workbench, or a shared YAML file into mysh.
If an engineer has exported a connection for you:
mysh import --from yaml --file connections.yamlSee Sharing Connections for details on the export/import workflow.
| Tool | Config file location (macOS) |
|---|---|
| DBeaver | ~/Library/DBeaverData/workspace6/General/.dbeaver/data-sources.json |
| Sequel Ace | ~/Library/Containers/com.sequel-ace.sequel-ace/Data/Library/Application Support/Sequel Ace/Data/Favorites.plist |
| MySQL Workbench | ~/Library/Application Support/MySQL/Workbench/connections.xml |
DBeaver and MySQL Workbench also support Linux paths:
| Tool | Config file location (Linux) |
|---|---|
| DBeaver | ~/.local/share/DBeaverData/workspace6/General/.dbeaver/data-sources.json |
| MySQL Workbench | ~/.mysql/workbench/connections.xml |
# Import from DBeaver
mysh import --from dbeaver
# Import from Sequel Ace
mysh import --from sequel-ace
# Import from MySQL Workbench
mysh import --from workbenchThis displays a list of discovered connections:
DBeaver: 5 connection(s) found
# NAME HOST PORT USER DATABASE SSH
1 my-production 10.51.80.122 3306 admin myapp bastion.example.com
2 server-db db-replica.lan 3306 admin hosting bastion.example.com
3 local-db 127.0.0.1 33306 root devdb -
Select connections (comma-separated numbers, or 'all') [all]:
Enter comma-separated numbers to pick specific connections, or all to import everything.
For each connection, you'll be prompted for only the essentials:
- Connection name — only if it conflicts with an existing name
- SSH user — only if missing from the source config
- Password — must be re-entered for security (press Enter to skip)
After import, you'll be asked whether to apply default output masking settings.
Both DBeaver and Sequel Ace protect passwords with encryption or macOS Keychain, so they cannot be imported automatically. Enter the password during import, or skip and set it later with mysh edit.
After import, mysh asks whether to apply default output masking:
Default mask columns: email,phone,*password*,*secret*,*token*,*address*
Apply output masking to protect sensitive data? [Y/n]:
- Yes — applies default mask rules and sets environment to
productionfor all imported connections - No — connections are imported as
developmentwith no masking; configure later withmysh edit
You can fine-tune environment, mask columns, and driver per connection:
mysh edit <connection-name>| Setting | Description |
|---|---|
| Environment | production / staging / development |
| Mask columns | email, phone, etc. (wildcards supported) |
| Driver | cli (default) / native (MySQL 4.x support) |
Masking behavior by environment:
- production — always masks sensitive columns
- staging — masks when output is piped (e.g., to AI tools)
- development — no masking
Use --all to skip the selection prompt and import all discovered connections:
mysh import --from dbeaver --allFor shared YAML files with direct DB connections, use --ask-user if each recipient should confirm or replace the DB user from the file:
mysh import --from yaml --file team-db.yaml --all --ask-userUse --db-user when all imported DB connections should use the same recipient-specific DB user. Add --reuse-password when those DB connections also share one password:
mysh import --from yaml --file team-db.yaml --all --db-user alice --reuse-password--ask-user and --db-user cannot be used together. These DB flags do not affect Redash connections, which still ask for the recipient's own Redash API key.
| Field | DBeaver | Sequel Ace | MySQL Workbench |
|---|---|---|---|
| Host | ✅ | ✅ | ✅ |
| Port | ✅ | ✅ | ✅ |
| User | ✅ | ✅ | ✅ |
| Database | ✅ | ✅ | ✅ |
| Password | ❌ (re-enter) | ❌ (re-enter) | ❌ (re-enter) |
| SSH host | ✅ | ✅ | ✅ |
| SSH port | ✅ | ✅ | ✅ |
| SSH user | △ (may be missing) | ✅ | ✅ |
| SSH key path | ✅ | ✅ | ✅ |
- DBeaver can be running — mysh only reads the config file
- Run
mysh import --from dbeaver - Select connections to import
- Enter passwords (or press Enter to skip)
- Choose whether to apply default masking
- Verify with
mysh listandmysh ping <name>
- Ensure connections are saved in Sequel Ace Favorites
- Run
mysh import --from sequel-ace - Select connections to import
- Enter passwords (or press Enter to skip)
- Choose whether to apply default masking
- Verify with
mysh listandmysh ping <name>
Note: Sequel Ace import uses macOS
plutilcommand (included with macOS).
- Run
mysh import --from workbench - Select connections to import
- Enter passwords (or press Enter to skip)
- Choose whether to apply default masking
- Verify with
mysh listandmysh ping <name>
- DBeaver: Check that the DBeaver data directory exists. The path may differ across DBeaver versions.
- Sequel Ace: Check that
Favorites.plistexists at the expected location. - MySQL Workbench: Check that
connections.xmlexists in the Workbench data directory.
DBeaver sometimes omits the SSH user from data-sources.json (it uses the OS username by default). mysh requires an explicit SSH user, so you'll be prompted during import.
mysh edit <connection-name>All settings including password can be updated after import.