Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pycharm Setting up Mysql Database Driver

Iam trying to set up mysql database connectivity in pycharm... I have already created the schema and it works in django etc... Iam trying to import the data source directly to pycharm but i get the following error...

Connection to Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:186)
    at com.intellij.persistence.database.console.RemoteJdbcServer.main(RemoteJdbcServer.java:15)
 failed

What should i do to make the database connectivity possible??? i have downloaded the mysql jar file for the above class... How do i include it in pycharm??? (I have clicked the install drivers button that comes as a hint but nothing happens)... Thnx...

like image 389
Ram G Athreya Avatar asked Jun 15 '26 14:06

Ram G Athreya


1 Answers

In the properties of your MySQL connection, in the "General" tab, below the "Test Connection" button, you should see "MySQL" as a link next to "Driver: ". Click that. In the next screen, inside the white box below "Driver Files" it should have a "Download" link.

like image 187
Dakusan Avatar answered Jun 18 '26 04:06

Dakusan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!