MySQL Support team is ready to assist with any queries or concerns.
Discover how to migrate and convert SQL Server to MySQL with Workbench. Our
Migrate and Convert SQL Server to MySQL with Workbench
The thought of migrating databases from Microsoft SQL Server to MySQL can be scary. Fortunately, the MySQL Workbench’s Migration Wizard makes the process a lot easier.
This tool automates schema conversion, data transfer, and compatibility adjustments, reducing manual effort and minimizing the risk of errors.
Today, our Experts will walk us through a step-by-step guide to migrate your database smoothly using MySQL Workbench.
An Overview:
- Why Use MySQL Workbench for Migration?
- Step-by-Step SQL Server to MySQL Migration
- Step 1. Prepare Your SQL Server Database
- Step 2. Configure the ODBC Driver
- Step 3. Launch the Migration Wizard in MySQL Workbench
- Step 4. Configure the Source Connection
- Step 5. Select the Database to Migrate
- Step 6. Perform Object Migration
- Step 7. Transfer the Data
- Post-Migration Verification
- Bonus Tip – Create an EER Diagram
Why Use MySQL Workbench for Migration?
- Automated schema conversion
- Bulk data transfer support
- Cross-platform compatibility
- Visual verification tools (EER diagrams)
MySQL Workbench can handle most processes like moving a simple table or a large database with multiple dependencies.
If you’re also looking to copy MySQL databases easily, check out this tutorial for managing MySQL data efficiently.
Step-by-Step SQL Server to MySQL Migration
Step 1. Prepare Your SQL Server Database
First, open Microsoft SQL Server Management Studio (SSMS) and select the database we want to migrate. For demonstration purposes, let’s assume we have a sample database called bc\_database, which contains a table named bobcares with five rows of data.
Step 2. Configure the ODBC Driver
This step sets up a connection bridge between SQL Server and MySQL Workbench.
- Open ODBC Data Sources.
- Then, click Add on the right side of the window.
- Now, scroll down and select ODBC Driver for SQL Server.
- Click Finish to open a configuration window.
- Next, enter a Data Source Name (DSN) and provide your SQL Server instance details.
- Click Finish to save the data source.
MySQL Workbench uses this ODBC configuration to connect to SQL Server.
Step 3. Launch the Migration Wizard in MySQL Workbench
- First, open MySQL Workbench and connect to the MySQL server.
- Then, go to the Database menu on the left.
- Select Migration Wizard from the dropdown.
- Then, click Start Migration to begin.
If you’re working with AWS RDS databases, this guide explains how to connect MySQL Workbench to remote databases like RDS.
Step 4. Configure the Source Connection
- Now, select ODBC Data Source as the connection method in the source selection window.
- Select the DSN you created in Step 2.
- Then, click Test Connection to verify the setup.
If we run into an error at this stage, go back to Step 2 to ensure the ODBC configuration is correct.
If you encounter errors, double-check the ODBC configuration. Sometimes, connection issues may stem from incorrect database or user selections, similar to the “no database selected” SQL import error.
After the connection is successful, click Next to proceed.
Step 5. Select the Database to Migrate
- Review the list of available databases.
- Then, select the SQL Server database we want to migrate.
- Click Next to continue.
Step 6. Perform Object Migration
This step handles the conversion of database objects, like Tables, Views, and Schemas.
- Review Source Objects.
- Check the Migration Progress.
- Use Manual Editing if needed (for complex object adjustments).
- Set Target Creation Options.
- Then, generate the Create Schemas scripts.
- Confirm the Create Target Results window to validate the operation.
If everything looks correct, go to the next step.
Step 7. Transfer the Data
- Configure Data Transfer Setup.
- Execute the Bulk Data Transfer process.
If the transfer completes successfully, we will receive a confirmation message.
If your SQL Server database is large, consider breaking the transfer into chunks or using additional data management strategies. For MySQL users, you can also load SQL files directly into MySQL as an alternative method.
Post-Migration Verification
After the migration, we need to verify that everything transferred correctly.
- Open a MySQL SQL Editor.
- Run a query on the migrated database, for example:
SELECT * FROM Northwind.categories;
Copy Code - Check that the tables and data are intact.
Bonus Tip – Create an EER Diagram
We can create a visual representation of our database with these steps:
- In MySQL Workbench, click Create EER Model From Existing Database.
- Follow the prompts to generate the diagram.
- Use Arrange > Autolayout to organize the model for easier viewing.
The EER diagram helps ensure all relationships and entities are correctly migrated.
[Need assistance with a different issue? Our team is available 24/7.]
Conclusion
In short, our Support Engineers demonstrated how to migrate and convert SQL Server to MySQL with Workbench.
0 Comments