简体   繁体   English

在Mac上找不到MySQL,使用mysql-connector-java-5.1.13-bin.jar的Eclipse项目出现问题

[英]MySQL not found on Mac, problems with eclipse project using mysql-connector-java-5.1.13-bin.jar

I have the following problem: I imported an existing project into eclipse. 我有以下问题:我将现有项目导入eclipse。 This project references the library mysql-connector-java-5.1.13-bin.jar . 该项目引用了mysql-connector-java-5.1.13-bin.jar When I try to run the project I get the following errors: 当我尝试运行项目时,出现以下错误:

Trying to add database driver (JDBC): RmiJdbc.RJDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): jdbc.idbDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Warning, not in CLASSPATH?
Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

So I tried to find out if mySQL is installed by using the terminal: type -a mysql command. 所以我试图找出是否通过使用终端安装了mySQL:输入-a mysql命令。 Result: type: mysql: not found Now I downloaded and installed mysql. 结果:类型:mysql:找不到现在我下载并安装了mysql。 It is listed in /usr/local/ now. 现在在/ usr / local /中列出了它。 But the command: type -a mysql still shows the same result and the java application produces the same errors. 但是命令:type -a mysql仍然显示相同的结果,并且Java应用程序产生相同的错误。 What do I have to do? 我需要做什么?

You need to check that mysql process is running... 您需要检查mysql进程是否正在运行...

$ ps ax | grep mysql

... and that mysql driver jar is really in your project class path (library). ...并且该mysql驱动程序jar确实在您的项目类路径(库)中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到文件mysql-connector-java-5.1.13-bin.jar - Could not find file mysql-connector-java-5.1.13-bin.jar Mail.jar和mysql-connector-java-5.1.13-bin.jar类路径 - Mail.jar and mysql-connector-java-5.1.13-bin.jar Classpath 使用外部库mysql-connector-java-5.1.24-bin.jar在Unix上编译Java项目 - Compiling a Java project on Unix using external library mysql-connector-java-5.1.24-bin.jar Mac上的CLASSPATH,以及Mac如何寻找mysql-connector-java-bin.jar - CLASSPATH on Mac, and how does Mac look for mysql-connector-java-bin.jar 找不到源JAR文件mysql-connector-java-5.1.20-bin.jar没有源附件 - Source not found The JAR file mysql-connector-java-5.1.20-bin.jar has no source attachement mysql-connector-java-5.1.23-bin.jar未部署 - mysql-connector-java-5.1.23-bin.jar NOT deployed 错误:在具有mysql-connector-java-5.0.7-bin的JAR中 - Error: in JAR with mysql-connector-java-5.0.7-bin Java mysql错误:找不到或加载主类lib \\ mysql-connector-java-5.1.25-bin.jar - Java mysql Error: Could not find or load main class lib\mysql-connector-java-5.1.25-bin.jar 我使用哪个MySQL连接器:mysql-connector-java-5.1.46.jar或mysql-connector-java-5.1.46-bin.jar有什么区别? - Which MySQL connector do I use: mysql-connector-java-5.1.46.jar or mysql-connector-java-5.1.46-bin.jar What is the difference? glassfish指定的库jar mysql-connector-java-5.1.23-bin.jar不存在 - glassfish specified library jar mysql-connector-java-5.1.23-bin.jar does not exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM