Reputation: 32986
I am editing a MYSQL database using phpMyAdmin. I want to turn this into an Oracle database. How can this be done?
Upvotes: 2
Views: 7684
Reputation: 135
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.
Upvotes: 1
Reputation: 10121
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.
Upvotes: 4