When using MySQL Workbench
to migrate data from SQL Server
to MySQL
I ran into a bug that it won't escape apostrophes. In the interim I would like to still port that data over. Is there any simple way to do this?
I've exported my data into a file with INSERT
statements but they don't match the syntax of MySQL
(I'm new to MySQL
) so I don't know if it would work, neither does the file contain semicolons at the end of each statement.
Thanks in advance.
Update
So, far it looks like the easiest way to do it is to export the data into flat files and go through each table and make sure to also generate a SSIS
file that you can use to automate future exports. Like so:
DTExec /File MyExportedSissFileForOneTable.dtsx
And then use PowerShell
or some other scripting language to do all the different files you need to update. Then import the files with MySQL
– which I haven't figured out yet.
Best Answer
In retrospect it is probably nicer to just roll my own converter since
MySQL
usessnake case
instead oftitle case
likeSQL Server
.So, what I'm going to do is use a
PowerShell
script like so:This will export all the data from my
SQL Server
database and put them in files and then I will import those files intoMySQL
. Which I haven't quite figured out yet. I let theMySQL Workbench
do the initialCREATE TABLE
statements and usedVim
to make everything snake case.