r/SQLServer • u/johnie3210 • Oct 26 '25
Question 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?
0
Upvotes
6
u/Codeman119 Oct 26 '25
You can generate the create table scripts, then have AI convert them.
2
u/Hairy-Ad-4018 Oct 26 '25
Why do you need /want to do this
2
u/Tikitorch17 Oct 26 '25
I have never used this, you can try AWS schema conversion tool. It is compatible for Sql server to MySQL conversion.
2
u/reddit_time_waster Oct 26 '25
Is the application layer using an ORM like Entity Framework? A lot of these have tools to generate the physical model, and the dev just has to change the target provider from SQL Server to MySql.
Other db entity relationship diagramming tools can do this too like dbvisualizer
3
u/soda1337 Oct 26 '25
This seem like a terrible idea. Is this just schema? Are there stored procedures?
1
u/chocolateAbuser Oct 26 '25
depends what features you use, how many tables are there
if you just have have data to transport then tbh just exporting sql and changing the syntax should not be that hard
btw are you really sure you want to go with mysql? not even postgres?
1
u/SirGreybush 1 Oct 26 '25
There is a windows MySQL ODBC driver so you push data from sql server to MySQL, but it’s a pain to setup.
If you export everything as .sql files, copy or ftp to the machine running MySQL then import there.
SSMS right click on the database name, generate scripts.
I suggest to do this multiple times, one pass for table structures. Another for data.
To keep the first file small. Easier to edit.
If you used for primary keys auto increment, you’ll have some adjustments to do. As sql server uses SET IDENTITY_INSERT OFF; to be able to insert data values manually in that column. Other DB languages do not.
1
u/gruesse98604 Oct 26 '25
OMG, this is a terrible idea. MySql is owned by Oracle, who will do their best to screw you. If you are bound & determined to stay w/ MySql then for the love of God go with MariaDb, NOT MySql!!!!
Why not PostGres?
0
u/[deleted] Oct 26 '25
[deleted] — view deleted comment
-3
u/[deleted] Oct 26 '25
[removed] — view removed comment