2

I am editing a MYSQL database using phpMyAdmin. I want to turn this into an Oracle database. How can this be done?

2 Answers 2

4

Use mysqldump to export your data from MySQL.

shell> mysqldump [options] db_name [tbl_name ...]

In the [options] you'll probably have to tell MySQL to export your database in a format that is recognizable by Oracle. You can to this with the --compatible=name option, where name can be oracle.

shell> mysqldump --compatible=oracle [options] db_name [tbl_name ...]

After this you import the data by executing the script (in the dump) in Oracle and hope there won't be any errors. Or use something like Oracle's Sql*Loader. (I don't have experience with that, however I've found an article that describes your scenario.)

(I've found a tutorial on using phpMyAdmin to do something similar. Maybe you're interested in it.)

Update

The --compatible option might not be supported for your particular version of MySQL. For example the documentation for MySQL 5.5 lists oracle as a supported value for this parameter, but the documentation for MySQL 8.0 does not.

Sign up to request clarification or add additional context in comments.

2 Comments

Unfortunately --compatible=oracle does not map data types to Oracle types or use Oracle comment syntax.
@AntonioBonifati'Farmboy' I've answered this a long time ago, it seems not all MySQL version's support this. Please see my updated answer. Also, make sure you're not using MariaDB, or if you do, check its documentation too.
1

This is old topic, but for those who are still seeking answers on how to convert MySQL database to Oracle, use SQLines (SQL Developer failed on migration). How to do it:

Skip if you have .sql script of your database.

Use mysqldump to extract MySQL database:

mysqldump -u _user_ -R _your_database_ > path_to_extracting_file.sql

Use then SQLines to convert MySQL to Oracle: https://www.sqlines.com/online

You will have to change some data manually, but in most cases it will do the job. You can also try: https://www.oracle.com/database/technologies/migrating-mysql-oracle-database.html, but you will need Third-party driver for MySQL. Personally, I had to do SQL Developer Migration + SQLines + manual editing to do successful migration.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.