Oracle and MySQL are two of the most popular Relational Database Management Systems (RDBMS). A large number of businesses widely use both Oracle and MySQL. These databases share several key similarities as well as differences.

Many users migrate Oracle to MySQL as per their use cases. This article will help you understand two easy methods to help you set up Oracle to MySQL Migration step-by-step, enabling you to leverage the advantages of both databases. You will also get a good overview of setting up an ETL Pipeline for Oracle to MySQL data migration.

Differences between Oracle and MySQL

OracleMySQL
1. Oracle requires costly licenses1. MySQL is free and open-source
2. Oracle offers advanced enterprise features2. MySQL is lightweight but still powerful.
Want to migrate your Oracle data effortlessly?

Method 1: Using Hevo Data to Set up Oracle to MySQL Migration

Use Hevo’s No-code data pipeline to load your Oracle data to any destination of your choice with just a few clicks. Start your 14 days free trial Now!

Get Started with Hevo for Free

Method 2: Manual Oracle to MySQL Migration 

Manually migrating data from Oracle to MySQL involves a complex process of exporting data from Oracle, potentially transforming it for compatibility, and then importing it into your MySQL database. This can be time-consuming, error-prone, and require specialized skills.

What are the Methods to Set up Oracle to MySQL Migration?

You can set up Oracle to MySQL Migration by implementing one of the following methods:

Method 1: Using Hevo Data to Set up Oracle to MySQL Migration

Hevo Data helps you directly connect Oracle to MySQL and various other sources, Data Warehouses, or a destination of your choice in a completely hassle-free & automated manner.

Hevo is the only real-time ELT No-code Data Pipeline platform that cost-effectively automates data pipelines that are flexible to your needs. Its fault-tolerant architecture ensures that the data is handled securely and consistently with zero data loss.

The following steps can be implemented to set up Oracle to MySQL Migration using Hevo:

  • Configure Source: Connect Hevo Data with Oracle by providing a unique name for your Pipeline and information about your Oracle database, such as its name, IP Address, Port Number, Username, Password, etc.
Oracle to MySQL - Configure Oracle as a Source | Hevo Data
Configure Oracle Source
  • Integrate Data: Complete Oracle to MySQL Migration by providing your MySQL database credentials, such as your authorized Username and Password, along with information about your Host IP Address and Port Number value. You will also need to provide a name for your database and a unique name for this destination.
Oracle to MySQL - Configure MySQL as a Destination | Hevo Data
Configure MySQL Destination

Here are more reasons to try Hevo:

  • Auto Schema Mapping: Hevo takes away the tedious task of schema management & automatically detects the schema of incoming data and maps it to the destination schema.
  • Incremental Data Load: Hevo allows the transfer of data that has been modified in real-time. This ensures efficient utilization of bandwidth on both ends.
  • Data Transformation: Hevo takes care of your data preprocessing through this feature and provides a simple interface to perfect, modify, and enrich the data you want to transfer.
Load data from Oracle to MySQL
Load data from Oracle to BigQuery
Load data from Oracle to Snowflake

Method 2: Manual Oracle to MySQL Migration 

  • Login to MySQL with your credentials.
  • Launch the option for the ODBC Connector data source.
  • Set up the Oracle ODBC data source to your MySQL database.
Oracle to MySQL - ODBC | Hevo Data
Oracle to MySQL – ODBC
  • Fill in the required details to connect the Oracle Server name, user, password, and database. Provide a suitable ODBC connection name. Click on the Test button to test the connection. 
  • Configure listener.ora file from Oracle. Navigate to the Oracle installation directory, and you’ll find the listener.ora file under $ORACLE_HOME/NETWORK/ADMIN directory and add the following to it:
SID_LIST_LISTENER =
<Space>(SID_LIST=
<Space>(SID_DESC=
<Space>(SID_NAME=test)
<Space>(ORACLE_HOME=C:oracleproduct11.2.0dbhome_1)
<Space>(PROGRAM=dg4odbc)
)
)
  • Update the location of ORACLE_HOME if the path mentioned is not your installation path.
  • The above configuration tells Oracle to use the dg4odbc program.
  • If you face any issue, type dg4odbc in the command line to check if that program exists or not. If you get an error as “Program not recognized”, add $ORACLE_HOME/bin to your path variable and relaunch the command line to check. 
  • Configure inittest.ora. The file will be created when you create a new SID in the listener.ora file. The naming convention of the file is init + SID name. Configure data source / SID for dg4odbc. Add the following to your inittest.ora file:
HS_FDS_CONNECT_INFO = test
  • The above line specifies which ODBC connection to use. In this case, in step 1, you have created an ODBC connection to form the connection. 
  • Configure tnsnames.ora file. The file location is $ORACLE_HOME/NETWORK/ADMIN/TNSNAMES.ora. Add the following lines to the file:
TSLINK = 
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=localhost)
(PORT=1521)
)
(CONNECT_DATA=
(SID=test)
)
(HS=OK)
)
  • In the above configuration, the HS=OK entry is very important, and you must ensure that you have used the same SID created on the listener.ora file.
  • Restart the Oracle Service and the TNS Listener Service.
  • Once Oracle is up and running, create a database Link in Oracle. Log in to the Oracle database with DBA rights (e.g. as SYS) and create the database link using the following syntax:
create public database link link2mysqltest connect to "oracle" identified by "oracle" using 'TSTLINK';
  • Test the database link and click on Finish.
  • Login to MySQL and run the below query which uses the test link created in the above steps.
select * from "test_table"@link2mysqltest

Limitations of Manual Oracle to MySQL Migration

The limitations of manually setting up Oracle to MySQL Migration are as follows:

  • Even though the user only has to make a few configuration changes to set up Oracle to MySQL Migration, it is difficult to get this migration right without deep Oracle administration knowledge. This might lead to Oracle throwing errors because of multiple configuration parameters that vary across different versions.
  • Even after getting the Oracle to MySQL Migration right, the connection, in reality, has many constraints and rough edges concerning the SQL queries that can be executed. You will encounter problems with functions and data types that are not supported at source and target databases.

You have seen the Oracle to MySQL migration challenges. Let’s get into the next one.

Why Migrate from Oracle to a MySQL Database?

There are several advantages when you convert Oracle to MySQL database for any reasons, such as:

  • MySQL is more cost-effective compared to Oracle. It is an open-source database, and it does not require associated licensing costs.
  • MySQL is simple and flexible due to its straightforward setup process and user-friendly interface. The syntax and commands in it are easy to learn and understand. Contrary to this, Oracle’s feature-rich PL/SQL language is complex.
  • MySQL possesses high-performance capabilities and scalability. It can handle large amounts of data efficiently and maintain optimal database performance simultaneously.
  • MySQL is an open-source community that provides a lot of troubleshooting and development support, resources, and documentation. It ensures MySQL remains reliable and up-to-date as it often releases updates and improvements to the MySQL database.
  • Compatible with multiple platforms and operating systems, MySQL easily integrates with various programming languages, frameworks, and tools.

Conclusion

This article provided a step-by-step guide on how to set up Oracle to MySQL Migration manually or using Hevo. . Along with the information on Oracle to MySQL migration step by-step, it also gives a brief overview of each of these software comprehensively.

However, there are certain limitations associated with the manual method. If those limitations are not a concern to your operations, then using it is an option, but if it is then you should consider using the automated Data Pipeline platform, Hevo.

The transparent pricing and 24×7 support make Hevo the highest-rated data pipeline software on many review sites.

Take our 14-day free trial to experience a better way to manage data pipelines.

Get started for Free with Hevo!

What are your thoughts on moving data from Oracle to MySQL? Let us know in the comments.

Frequently Asked Questions

1. Can we migrate from Oracle to MySQL?

Yes, you can migrate from Oracle to MySQL.

2. What tool is used to migrate Oracle to MySQL?

a) MySQL Workbench
b) Oracle SQL Developer
c) Third-Party Tools like Hevo

3. Is MySQL compatible with Oracle?

MySQL and Oracle Database have different architectures, features, and functionalities. While they are both relational database management systems (RDBMS), there are several points of compatibility and incompatibility between them.

Vishal Agrawal
Technical Content Writer, Hevo Data

Vishal Agarwal is a Data Engineer with 10+ years of experience in the data field. He has designed scalable and efficient data solutions, and his expertise lies in AWS, Azure, Spark, GCP, SQL, Python, and other related technologies. By combining his passion for writing and the knowledge he has acquired over the years, he wishes to help data practitioners solve the day-to-day challenges they face in data engineering. In his article, Vishal applies his analytical thinking and problem-solving approaches to untangle the intricacies of data integration and analysis.

No-code Data Pipeline For Oracle and MySQL