·6 min read
Making SSMS work with MySQL: a linked server and live views
Shared-hosting MySQL comes as a jdbc:mysql://... connection string, and I wanted to browse it in SSMS. It cannot. SSMS speaks only Microsoft SQL Server's TDS protocol. Two small Windows tools came out of that problem in early October 2026: SQL Manager Lite, a phpMyAdmin-style file manager, and SSMS Connector SQL, a bridge that makes a MySQL database appear inside SSMS as live views.
- Role
- Creator and sole developer
- Period
- Oct 2026
- Status
- Released: sql_manager_lite v1.0.1, ssms_connector_sql v1.3.0
- Stack
- C# (.NET 8, WinForms), T-SQL, Python (tkinter, SQLite)
Read `BridgeSql.cs` to see how a T-SQL trigger turns a table drop in SSMS into a DROP TABLE on MySQL.
View on GitHubThe challenge
Shared hosting usually gives you MySQL and a web panel. I wanted a familiar layout: Object Explorer, a query editor, right-click Select Top 1000 Rows. The obstacle is protocol, not syntax. SSMS connects to SQL Server, full stop.
I split the problem in two. The first tool, SQL Manager Lite, handles files: open a .sql dump, SQLite, CSV, JSON or Excel file, edit it like phpMyAdmin, save it back. The second, SSMS Connector SQL, handles live servers. The second one is where the real engineering was.
My responsibility
I am the only developer of both. I wrote the connection parser, the DPAPI-encrypted connection store, the WinForms client, the bridge installer, and every T-SQL object the bridge creates. I also owned the release cadence and the README warnings.
How I approached it
The idea is old and slightly sneaky: let SQL Server talk to MySQL for you. A linked server over the MariaDB ODBC driver gives SQL Server a door to MySQL, and views on top of OPENQUERY make remote tables look local.
Paste and go
First, the client itself. ConnInfo.Parse accepts a JDBC URL, a mysql command line or an ADO.NET string and fills every field, because hosting panels hand out all three. It also decodes URL-encoded passwords (%2B becomes +). Saved connections keep passwords encrypted with Windows DPAPI for the current user, via ProtectedData.Protect.
The bridge installer
Release v1.1.0, f0dc934, added the bridge. It installs the MariaDB ODBC driver if missing, downloaded and checked against a pinned SHA-256 (the code throws if the hash differs), starts LocalDB, registers the linked server and creates the views. For OPENQUERY to work, three server options are turned on: rpc, rpc out, data access.
Inserts that the driver rejected
Writing through the views ran into a driver limit. The comment in BridgeSql.cs states the cause plainly: inserts through OPENQUERY views fail in the ODBC driver when columns are omitted, as with identity or defaults. The fix in 8f22162 is an INSTEAD OF INSERT trigger on every view. It copies the rows into a temp table and calls a procedure that builds plain MySQL INSERT statements, skipping NULL and omitted columns:
CREATE OR ALTER TRIGGER dbo.[orders__mysql_insert] ON dbo.[orders]
INSTEAD OF INSERT AS BEGIN SET NOCOUNT ON;
SELECT * INTO #mysql_ins FROM inserted;
EXEC dbo.mysql_insert_rows 'orders';
ENDThe orders name is my illustration; in the code the trigger name is @n + '__mysql_insert' per table. Updates and deletes pass through the view without a trigger.
Views that kept showing old columns
Release v1.2.0, 7428641, introduced dbo.mysql_refresh_views, so new tables got views and dropped ones lost theirs. The interesting part is how it detects change cheaply. One remote query returns a signature per table:
SELECT TABLE_NAME, CONCAT(COUNT(*), '-',
SUM(CRC32(CONCAT_WS(':', ORDINAL_POSITION, COLUMN_NAME, COLUMN_TYPE)))) AS sig
FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE()
GROUP BY TABLE_NAMEOnly views whose signature changed are rebuilt. And there is a subtle catch recorded in a code comment: metadata is cached per query text, so without a change in the text a rebuilt view keeps stale columns. The sync therefore embeds the signature inside the view's query as /* sig */. A comment changes the text, which defeats the cache. The code comment is the reason I can explain it at all.
v1.0.0 client
v1.1.0 bridge
v1.2.0 auto-sync
v1.3.0 two-way
Two-way sync, and a dangerous side effect
Release v1.3.0, 8f22162, made the bridge two-way. A database-level DDL trigger, mysql_bridge_ddl, listens for CREATE_TABLE, ALTER_TABLE, DROP_TABLE, DROP_VIEW and RENAME in SSMS and mirrors each onto MySQL. A table made in the SSMS designer is built on MySQL through dbo.mysql_create_table_ddl, which maps SQL Server types to MySQL ones (bit to TINYINT(1), uniqueidentifier to CHAR(36), identity to AUTO_INCREMENT).
The cost of that power is simple and I put it in the README as a quote:
The same commit also set remote proc transaction promotion to false so EXEC ... AT works inside designer transactions without MSDTC, and its refresh avoids a local transaction for the same reason. The sync's own drops are skipped through a session flag, so the trigger does not mirror what the refresh itself does.
A settings bug in the file manager
In SQL Manager Lite the story was smaller but instructive. Commit 74b72d7 (Oct 2026), a fix about 35 minutes after the first commit, stopped writing settings next to the exe and moved them to %APPDATA%\SqlDumpManager. It also made load_settings validate every key, clamping font_size between 7 and 22, so a damaged config file no longer breaks startup. Writes now go to a .tmp file and os.replace it. Uncaught errors go to an error.log and a dialog.
Project journey
Oct 2026
sql_manager_lite 1f71194
portable phpMyAdmin-style manager for dumps, SQLite, CSV, JSON, Excel
Oct 2026
sql_manager_lite 74b72d7
settings in APPDATA, validated config, error log (v1.0.1)
Oct 2026
ssms_connector_sql f7b7aed
portable MySQL client with SSMS-style UI (v1.0.0)
Oct 2026
f0dc934
Bridge to SSMS via linked server (v1.1.0)
Oct 2026
7428641
auto-sync views with MySQL schema (v1.2.0)
Oct 2026
8f22162
real-time two-way sync between SSMS and MySQL (v1.3.0)
Beyond the launch
One detail shows the iteration. In 7428641 the README said views refresh "every N minutes". In 8f22162 the Bridge dialog changed from a one-to-1440 minute spinner with a default of 5 to Minimum = 3, Maximum = 3600, Value = 10 seconds, because a bridge that lags minutes behind phpMyAdmin does not feel live. BridgeWatcher runs the refresh on a timer and skips a tick if the previous one is still running.
The outcome
Verifiable from the repositories: four tagged releases of the bridge (v1.0.0 to v1.3.0) and a v1.0.1 release of the file manager; a single-file, self-contained win-x64 build for the bridge; and a bridge that supports live reads and writes, CREATE TABLE, drop and rename mirroring, and a documented dbo.mysql_exec escape hatch.
If your problem is a dump file rather than a live server, SQL Manager Lite opens it with one double-click.
View the file managerEvidence
- Repositories: https://github.com/ddatunashvili/ssms_connector_sql and https://github.com/ddatunashvili/sql_manager_lite
- Commits:
f7b7aed,f0dc934,7428641,8f22162,1f71194,74b72d7 - Files relied on:
BridgeSql.cs,BridgeForm.cs,BridgeWatcher.cs,ConnInfo.cs,sqldumpmanager.py, both READMEs - Not verified: I did not run the bridge against a live MySQL host or SSMS for this write-up, so behaviour is described from the code and README.
#C##SQL Server#MySQL#Windows
Keep reading
Have a project in mind?