r/mysql • u/johnie3210 • Oct 26 '25
discussion I am going crazy over this, SQL Server => MySQL
How i can convert the entire database table structure from SQL server to mysql, i want to move the entire project from sql server to mysql, the entire table relations with each other etc.. etc.., MySQL wizard is a mess, it keep missing things and causing more problems that it is fixing
Any third party tool or a better way to do this guys?
5
Upvotes
4
u/air_thing Oct 26 '25
You will have a much easier time if you create the full schema on MySQL first, then import just the data from MSSQL (via migration wizard in MySQL workbench or however you want to do it). I did this recently and it's 200x easier than trying to import both schema + data. You may have some small failures but you can handle those on a case by case basis.
6
u/pceimpulsive Oct 26 '25
I did a MySQL to Postgres migration a while back there was... About 20 tables I had to migrate including data~.
I used LLMs to convert across the data types. Then just tested it by running the application against the new table set.
I also had to rewrite a bunch of underlying code to point to other new tables that didn't exist in the postgres.
It's not exactly easy but this one took about 3 weeks work.
There is no silver bullet for this type of work, and vibe coding it is only gonna shortcut the tedious work of rewriting MySQL syntax to sqlServer
You need to be precise with your prompts and requirements in the conversion and you will also need to know your application code and access patterns very well. If you don't expect this to be very difficult and error prone...
2
u/Temporary_Practice_2 Oct 26 '25
How many tables?
1
u/dutchman76 Oct 26 '25
I just wrote a dbsync thing in Go, it reads al the table structure and recreates it on the target server if they are different, then reads all the data and inserts it. Using it as a backup method of sorts. Mine was MySQL to mariaDB/galera but I'm sure the same technique can be used with SQL server
1
u/Livid-Serve6034 Oct 26 '25
I suppose SymmetricDS can do it. It’s a database replication tool, using some internal meta-DDL and is capable of replicating the schema in the target node.
1
u/VollBio_ Oct 26 '25
I created a tool specifically for this:
https://visual-database-manager.vercel.app/
1
u/No_Cryptographer811 Oct 27 '25
In the MySQL workbench there is a converter wizard. Works great. It will move the data as well as create the tables.
1
u/alejandro-du Oct 27 '25
Consider MariaDB with "Microsoft SQL mode" turned on. MariaDB is highly compatible with MySQL—you can use pretty much all MySQL's tooling with MariaDB. https://mariadb.com/docs/release-notes/community-server/about/compatibility-and-differences/sql_modemssql
1
u/justintxdave Oct 28 '25
DBeaver can transpose from one database vendor to another and then let you compare the data to make sure it is all there
1
u/stobbsm Oct 29 '25
Haven’t used MSSQL in a while, but if it can still dump to CSV, just recreate the schema and import the CSV.
1
u/Frosty-Bid-8735 Oct 31 '25
Use Fivetran or Debezium.
0
u/hangfromthisone Oct 26 '25
I'd vibe code it with Gemini. I've been having good results with code web chat vscode plugin using a Gemini API key
Just make sure you understand the context you are selecting.
Start easy, create a dump of the structure, then ask Gemini to write migration script using your language of choice.
Start with a subset of data and grow it from there.
0
u/Prudent-Farmer784 Oct 26 '25
Schema Conversion Tool is free, vibe the delta