How to Migrate from Microsoft SQL Server to MySQL using Workbench?
Last Updated :
01 Jul, 2024
MySQL Workbench is a visual tool used for database design, migration, development, and administration. It is a very powerful tool that is used by developers and database administrators. MySQL workbench has a great tool Migration Wizard. This tool will help in the the migrating database from some other database management systems( such as SQL Server, PostgreSQL, etc) to MySQL.
In this article, we are going to cover all the steps required to migrate Microsoft SQL Server to MySQL using Workbench. We will provide clear explanations with images demonstrating the process.
Introduction to MySQL Workbench
MySQL Workbench is a powerful visual tool used for database design, migration, development, and administration. It is generally used by developers and database administrators. It provides a great graphic user interface( GUI) for developers and database administrators to interact with MySQL very efficiently.
It also provides powerful SQL development features. It is a cross-platform tool that ensures its accessibility across different platforms like Windows, macOS, and Linux.
Prerequisites
- Microsoft SQL Server management studios
- MySQL Workbench
- ODBC Driver for SQL Server ( Any recent version is preferred)
Step-by-Step Guide to Migrate from Microsoft SQL Server to MySQL using MySQL Workbench
Below is a Step-by-Step procedure by which we can migrate from Microsoft SQL Server to MySQL using workbench.
Step 1: Open Your Microsoft SQL Server Management Studios
In the first step, we will open our Microsoft SQL Server management studios and select the database we want to migrate to MySQL. For example purpose, I have created a dummy database in the main file, gfg_database. This database will contain a table named geeksforgeeks with five rows.
SQL Server StudioStep 2: Set up a Connection with ODBC Driver
This is the most crucial step. We need to search in "ODBC Data Source" in the search bar of your operating system and hit enter. A window will gets opened. Now click on "Add" button present in the right hand side of the window. Now scroll down and select "ODBC Driver for SQL Server".
Now click on finish. Now a pop-up window will gets opened. Now give a good generic name along with Server. As you can see in the previous image, my server is "DESKTOP-DAG4IB\SQLEXPRESS". Now click on finish button. A data source has been added now.
ODBC DriverStep 3: Open MySQL Workbench and Navigate to Migration Wizard
In this step, we will open our MySQL workbench and connect to the server. After connecting we will navigate to the Migration Wizard. We just need to navigate to the database option present in left hand side of the window and click on it. A drop down menu will open up. Now we have to choose Migrating Wizard option from it and hit enter.
WorkbenchNow select Migration wizard and click on it. A new window will open up.
WorkbenchNow click on "Start Migration" button. Now a new window will open up.
Step 4: Source Selection
In this step you need to select your source. In the connection method choose "ODBC Data Source". Now, in DSN, select your created data source ( we have created a data source in step 2). Now click on "Test Connection".
Note : If you get an error message, review the step 2 process very carefully
workbenchIf everything goes fine, it will display a success message. Now click on Next button.
SuccessStep 5: Schema Selection
Carefully review, target select and fetch schema list step. After review click Next. In the Source Selection step, carefully select the database you want to migrate from Microsoft SQL Server to MySQL.
SchemaNow click on 'Next' button.
Step 6: Object Migration
In this step, we have to carefully review each part of object migration. We have check Source Object -> Migration -> Manual Editing -> Target Creation Options -> Create Schemas -> Create Target Result . In Source Object, we have to choose the database object we want to migrate and click next. After reviewing each step, we have to click 'Next'.
Objct MigrationIf everything goes fine, you will this type of result in "Create Target Results" window.
Step 7: Data Migration
This is the last step in the process. We need to review two steps i.e. Data Transfer Setup -> Bulk Data Transfer. After carefully review these steps, we have to click 'Next'. If everything works fine, you will get the success message like this.
Data MigrationNow your data is migrated from Microsoft SQL server to MySQL using workbench.
Performing Operations on the 'geeksforgeeks' Table
As we know, we have created a table in the main file named 'geeksforgeeks' in the Microsoft SQL Server. But now, when we have migrated it into our MySQL workbench, we can perform task in the table from MySQL workbench. Lets try to display the tables data.
Query:
SELECT * FROM geeksforgeeks
Output:
OutputAs we can clearly see that our table geeksforgeeks is present in the MySQL workbench and we can easily perform operations on it.
Conclusion
Overall, MySQL workbench is a versatile tool used by developers and database administrators (DBAs) to perform database design, migration, development and administration related tasks. It provides a great graphic user interface( GUI) for developer and DBAs to interact with MySQL database very efficiently. We have covered all the steps with clear explanations and attached an image demonstrating the process. Now you can easily migrate Microsoft SQL Server to MySQL using Workbench and can perform task on the migrated database in Workbench.
Similar Reads
How to Install SQL Workbench For MySQL on Windows?
MySQL Workbench is a unified visual tool for database architects, developers & Database Administrators. It provides data modeling, SQL development & comprehensive administration tools for server configuration & user administration. It is available for all major operating systems like Win
2 min read
How to Migrate from MySQL to PostgreSQL?
Migrating from MySQL to PostgreSQL has become a strategic move for businesses and developers seeking improved scalability, performance, and support for complex data types. PostgreSQLâs advanced features and SQL standards make it a preferred choice for high-performance database management. In this ar
5 min read
How to Migrate SQL Server Database to MySQL?
The migration of an SQL Server database to MySQL can be an intricate process, but using the ODBC driver facilitates the execution, so no worries for users with basic skills. This guide will take you through transferring the database called 'Work' from Microsoft SQL Server to MySQL, ensuring that all
5 min read
How to Install SQL Workbench For MySQL on Linux?
MySQL Workbench is a visual database design tool that integrates SQL development, administration, database design, creation, and maintenance into a single integrated development environment for the MySQL database system. It was first released in 2014. It is owned by Oracle Corporation. It supports W
2 min read
How to Migrate from MySQL to Oracle
Migrating a database from MySQL to Oracle can be a complex yet rewarding endeavor, especially when transitioning between relational database management systems (RDBMS). This guide will explore the step-by-step process of migrating from MySQL to Oracle, covering key concepts, tools, and best practice
5 min read
How to Install MySQL Workbench on MacOS?
MySQL Workbench is a unified visual tool for database architects, developers & Database Administrators. It provides data modeling, SQL development & comprehensive administration tools for server configuration & user administration. It is available for all major operating systems like Win
1 min read
How to read image from SQL using Python?
In this article, we are going to discuss how to read an image or file from SQL using python. For doing the practical implementation, We will use MySQL database. First, We need to connect our Python Program with MySQL database. For doing this task, we need to follow these below steps: Steps to Connec
3 min read
How to Migrate Data from SQL Server to Oracle Database?
The conversion of data from one database management system to another can be a difficult process, particularly when migrating from SQL Server to Oracle Database. In this article, We will learn about How to migrate data from SQL Server to Oracle database by providing clear and detailed procedures. Ov
5 min read
How to insert values into MySQL server table using Python?
Prerequisite: Python: MySQL Create Table In this article, we are going to see how to get the size of a table in MySQL using Python. Python allows the integration of a wide range of database servers with applications. A database interface is required to access a database from Python. MySQL Connector-
2 min read
How to migrate SQLite to SQL Server?
Migrating databases from SQLite to SQL Server can be a complex but necessary process for organizations aiming to scale operations by improving performance or leveraging advanced database features. SQLite is favored for its lightweight design, whereas SQL Server offers robust capabilities ideal for e
5 min read