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
Non-linear Components In electrical circuits, Non-linear Components are electronic devices that need an external power source to operate actively. Non-Linear Components are those that are changed with respect to the voltage and current. Elements that do not follow ohm's law are called Non-linear Components. Non-linear Co
11 min read
Spring Boot Tutorial Spring Boot is a Java framework that makes it easier to create and run Java applications. It simplifies the configuration and setup process, allowing developers to focus more on writing code for their applications. This Spring Boot Tutorial is a comprehensive guide that covers both basic and advance
10 min read
Class Diagram | Unified Modeling Language (UML) A UML class diagram is a visual tool that represents the structure of a system by showing its classes, attributes, methods, and the relationships between them. It helps everyone involved in a projectâlike developers and designersâunderstand how the system is organized and how its components interact
12 min read
Backpropagation in Neural Network Back Propagation is also known as "Backward Propagation of Errors" is a method used to train neural network . Its goal is to reduce the difference between the modelâs predicted output and the actual output by adjusting the weights and biases in the network.It works iteratively to adjust weights and
9 min read
3-Phase Inverter An inverter is a fundamental electrical device designed primarily for the conversion of direct current into alternating current . This versatile device , also known as a variable frequency drive , plays a vital role in a wide range of applications , including variable frequency drives and high power
13 min read
Polymorphism in Java Polymorphism in Java is one of the core concepts in object-oriented programming (OOP) that allows objects to behave differently based on their specific class type. The word polymorphism means having many forms, and it comes from the Greek words poly (many) and morph (forms), this means one entity ca
7 min read
CTE in SQL In SQL, a Common Table Expression (CTE) is an essential tool for simplifying complex queries and making them more readable. By defining temporary result sets that can be referenced multiple times, a CTE in SQL allows developers to break down complicated logic into manageable parts. CTEs help with hi
6 min read
What is Vacuum Circuit Breaker? A vacuum circuit breaker is a type of breaker that utilizes a vacuum as the medium to extinguish electrical arcs. Within this circuit breaker, there is a vacuum interrupter that houses the stationary and mobile contacts in a permanently sealed enclosure. When the contacts are separated in a high vac
13 min read
Python Variables In Python, variables are used to store data that can be referenced and manipulated during program execution. A variable is essentially a name that is assigned to a value. Unlike many other programming languages, Python variables do not require explicit declaration of type. The type of the variable i
6 min read
Spring Boot Interview Questions and Answers Spring Boot is a Java-based framework used to develop stand-alone, production-ready applications with minimal configuration. Introduced by Pivotal in 2014, it simplifies the development of Spring applications by offering embedded servers, auto-configuration, and fast startup. Many top companies, inc
15+ min read