在PHPStorm中连接到MySQL数据源 [英] Connect to MySQL Data Source in PHPStorm

查看:180
本文介绍了在PHPStorm中连接到MySQL数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将IDE"Phpstorm"与"wampserver"一起使用.我想连接MySQL数据源,但出现问题:

I'm using an IDE "Phpstorm" with "wampserver". i want to connect with MySQL data source, but i'm getting a problem:

Connection to MySQL - DatabaseName@localhost failed: Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at com.intellij.persistence.database.console.RemoteJdbcServer.main(RemoteJdbcServer.java:15)

我还下载了mysql-connector-java-gpl-5.1.29.msi并安装了它,但是仍然遇到一些问题.

I also downloaded mysql-connector-java-gpl-5.1.29.msi and installed it, but I'm still getting some problems.

推荐答案

出现此问题时,数据源和驱动程序"对话框的一部分显示驱动程序文件",我将其展开,并且有指向下载驱动程序文件.

When I had this issue, there was a section of the Data Sources and Drivers Dialogue box that said "Driver Files" I expanded it and there was a link to download driver files.

我单击了它-几秒钟后(没有明显的视觉进度指示器),消息更改为使用MySQL驱动程序.

I clicked it - and after a few seconds (with no obvious visual progress indicator) the message changed to say using MySQL drivers.

此后它起作用了.

这篇关于在PHPStorm中连接到MySQL数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆