Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to migrate SQL Server database to MySQL? [closed]

I have a SQL Server database with lots of data and an empty MySQL database. Now I want to copy all data of SQL Server database (including the database schema) to the MySQL database.

I thought about using raw SQL dump, but SQL Server's SQL syntax is not same as MySQL.

And I have googled some database migration tool, such as south (only for django), simple-db-migration (only for one type of database, maybe PostreSQL?) and SQLAlchemy (I haven't finished learning it, just feeling it somewhat clunky).

What tool can I use to do this migration?

like image 901
Mark Ma Avatar asked Nov 05 '11 08:11

Mark Ma


People also ask

Can you migrate from SQL to NoSQL?

When migrating from SQL to NoSQL, the primary key in the relational table becomes the partition key in the NoSQL table. If the RDBMS table must be joined to additional tables to retrieve the business object, those closely related tables should combine into a single NoSQL table.

How do I disconnect a SQL database?

In SQL Server Management Studio Object Explorer, connect to the instance of the SQL Server Database Engine and then expand the instance. Expand Databases, and select the name of the user database you want to detach. Right-click the database name, point to Tasks, and then select Detach.

What is MySQL migration Wizard?

With the MySQL Workbench Migration Wizard, users can convert an existing database to MySQL in minutes rather than hours or days that the same migration would require using traditional, manual methods. The Migration Wizard allows you to easily and quickly migrate databases from various RDBMS products to MySQL.


2 Answers

I'm usually using opendbcopy for these kind of jobs ...

like image 66
aleroot Avatar answered Sep 22 '22 07:09

aleroot


I tried this tool once http://dbconvert.com/convert-mssql-to-mysql-pro.php , but you have to pay for the full version. Of course you can write your own migration script e.g. in PHP. On Windows it will be easy to connect to MSSQL server, from a Linux machine you have to use ODBC and that is sometimes a bit messy to install and configure.

like image 37
georgepsarakis Avatar answered Sep 22 '22 07:09

georgepsarakis