MySQLink — Browse, Edit & Visualize MySQL/MariaDB in VS Code
MySQLink lets you browse, edit, and visualize MySQL/MariaDB databases directly inside VS Code. It includes a connection & table sidebar, a table view for inline row editing, and a diagram view to understand schema relationships. Passwords are stored securely via VS Code Secret Storage.
Highlights
- Manage multiple database connections from a dedicated sidebar
- Read/write rows from a grid-style table view
- Visualize schemas (PKs, indexes, FKs) with an ER diagram
- Primary keys auto-detected via
SHOW KEYS ; date/time values safely normalized
- Choose your driver:
mysql2 (default) or mariadb
Screenshots
A quick look at the core views.
Add and test database connections.
Inspect and edit rows inline; run custom SELECT queries.
Browse databases, tables, and columns, with row counts when available.
Features
- Sidebar
- Create, edit, and delete connections; optionally group them in directories
- List tables with row counts (via
information_schema , falling back to COUNT(*) when needed)
- Check connection status (passwords are stored in VS Code Secret Storage)
- Table View
- Display the first page of data (
LIMIT only; no OFFSET )
- Insert, update, and delete rows inline
- Run custom
SELECT queries using inferred column metadata
- Diagram View
- Build an ER diagram from
information_schema (schema, PKs, indexes, FKs)
- If FKs are not explicitly defined, infer relationships heuristically from
*_id columns
- Driver Switching
- Choose
mysql2 (default) or mariadb
Installation
- VS Code Marketplace: Search for "MySQLink" by publisher "iwasaki" and click Install.
- From a VSIX: Run
code --install-extension mysqlink-<version>.vsix .
Commands
MySQLink: Add Database (mysqlink.addConnection ) — Add a new connection
MySQLink: Refresh Connections (mysqlink.refreshConnections ) — Refresh connections and caches
MySQLink: Create Directory (mysqlink.createDirectory ) — Create a directory to group connections
Settings
mysqlink.dbDriver : mysql2 | mariadb (default: mysql2 )
Requirements & Permissions
- Network access to a MySQL or MariaDB instance (local or remote)
- Minimum privileges:
- Read-only:
SELECT , SHOW DATABASES /SHOW TABLES , SHOW KEYS , read access to information_schema
- Read/write: add
INSERT , UPDATE , DELETE
Grant the least privileges needed for your environment.
Security & Data Storage
- Passwords are stored in VS Code
SecretStorage .
- Non-secret connection metadata (id, name, host, port, database, user) is stored in the extension
globalState .
- Database contents are not transmitted for any purpose other than providing the extension’s features (communication is between your DB and VS Code).
Known Limitations
- Only the first page of table data is fetched (
LIMIT only; OFFSET not applied)
- ER diagram FK inference from
*_id columns may differ from your actual schema when explicit FKs are missing
- Row counts prefer
information_schema ; if unavailable, a fallback COUNT(*) may be slower on very large tables
Troubleshooting
- Cannot connect / timeouts: Verify
host , port , database , user , firewall rules, and VPN/proxy settings.
- Authentication fails: Re-enter and update the password (Secret Storage) and check server auth modes/compatibility.
- Row counts missing/slow: Confirm
information_schema access or consider the cost of COUNT(*) .
- ER diagram looks off: Ensure explicit foreign keys exist or review naming conventions beyond
*_id .
FAQ
Which driver is used?
mysql2 by default; you can switch to mariadb in settings.
Can I run arbitrary SQL?
The table view is designed for SELECT queries. Use the inline editor for data changes.
Is it safe to use alongside other tools?
Yes. The extension runs inside VS Code and stores secrets in Secret Storage. Follow your organization’s policies for permissions and connections.
| |