Home >Database >Mysql Tutorial >mysql-数据库连接报错,没有合适的驱动包

mysql-数据库连接报错,没有合适的驱动包

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 09:35:241309browse

mysqljdbctomcat数据库

Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:myql://localhost:3306/usersinfo","root","****");
网上的方法:
1.把连接包目录添加到classpath
2.把连接包导入到jre里
3.把连接包添加到tomcat/webapps的对应工程目录的lib文件夹里
4.把连接包添加到tomcat的lib里
我都实验了但都没有效果。我的mysql版本是5.5-28,连接包的版本是Connector/J 5.1.37,但我下载的时候看到这个包好像是和平台无关的,难道是这个原因么,但是我又找不到5.5的连接包啊
大神给指点一下看看我的问题在哪里?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn