Linux下Java连接Mysql 出现“ClassNotFoundException:com.mysql.jdbc.Driver”

环境

RedHat Linux 9 + VWWare 8.0 + SSH 3.2.9 + Putty 0.62 + MySQL 3.2

问题

LinuxJava连接Mysql出现“ClassNotFoundException:com.mysql.jdbc.Driver”错误

解决

1.把驱动文件放在这个文件夹里

$JAVA_HOME//jre/lib/ext/mysql-connector-java-5.1.19-bin.jar

2. 编辑/etc/profile文件

Linux下Java连接Mysql 出现“ClassNotFoundException:com.mysql.jdbc.Driver”_第1张图片

参考资料

Linuxjdbc连接mysql

http://blog.csdn.net/laxsong/article/details/570722

linuxjava连接mysql运行时报ClassNotFoundException:com.mysql.jdbc.Driver

http://zhidao.baidu.com/question/211714663.html

你可能感兴趣的:(Linux下Java连接Mysql 出现“ClassNotFoundException:com.mysql.jdbc.Driver”)