How do I enable MySQL in SQL Developer?
By default, SQL developer can be used to connect only Oracle databases.
As you can see, there's only Oracle tab in the connection option. Luckily, SQL developer provides a very special feature that can import the third party JDBC driver into SQL developer. So that we can connect the third party databases other than Oracle's via this driver.
The question is, how do I enable MySQL in SQL Developer? To connect MySQL databases from Oracle SQL Developer, we take the following steps to make SQL developer connect MySQL:
- Download MySQL JDBC driver from mysql.com.
- Open preference dialog in Tools's menu.
- Find "Third Party JDBC Driver".
- Add an Entry for MySQL JDBC driver.
- Check MySQL connections.
Download MySQL JDBC Driver
Before we import MySQL JDBC driver into SQL developer, we need to download it. Please go to MySQL :: Download Connector/J and look for a proper connector to download.
In the download page, please select Platform independent for your windows platform.
Please note that, in the compressed file, only one JAR file is useful. In my case, the file is called mysql-connector-java-8.0.14.jar. And I put it at the conventional path of JDBC library.
Open Preference Dialog
Click on "Preference" function on "Tools" menu to open the dialog.
Find "Third Party JDBC Driver"
Expand "Database" and click on "Third Party JDBC Driver" in the preference dialog, then click Add Entry.
Add an Entry for MySQL JDBC Driver
Select on our new driver file in the file selector to add the new JDBC driver.
Now SQL developer has imported MySQL JDBC driver.
Check MySQL Connections
Now, let's check the connection options again.
As we can see, there's a new MySQL tab that offers capability to connect MySQL databases. If the new tab didn't show up as expected, you may reopen SQL developer to make it available.
Now we can test the functionality of this MySQL JDBC driver by providing database information and credentials, then click Test.
The test is successful. Which means the new driver is working now.
I got an error when i click “Test”:
Status : Failure -The server time zone value ‘WIB’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
Add in Port /?serverTimezone=UTC#
For example: 3306/?serverTimezone=UTC#
And test connection!
Thanks, this is a very clear set of instructions.
Explained very well.
I did the steps shown by you, but it is NOT displaying the MYSQL tab. Have you faced this problem already?
No, I haven’t. Maybe you should check the procedure and do it all over again.
I had to close SQL Developer and reopen in order for the new driver to become available.
Good tips! Thanks for your feedback!
Superb instructions, worked from the first try on. Thanks very much, really much appreciated!!!
I’m glad it’s helpful.
Hi Ed, your instructions worked for me, thank you!
I’m glad it works for you!
Hi, any instructions for DBLINK? I can query the MySQL server on a remote machine thru SqlDeveloper your instructions are spot on.
I have an oracle database server with the same dataset and trying to compare the 2 databases and see where my differences are in some tables. I can do this Oracle to oracle with DBLINK. I can create the DBLINK to MySQl byt my Query says NO TNS LISTENER. I am assuming that I need to setup ODBC connection for DBLINK to MySql but having a hard time finding instructions.
Thanks in advance!
Have you ever heard Oracle Database Gateway? In heterogenous environments, it enables you to connect to non-Oracle databases.