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的连接包啊
大神给指点一下看看我的问题在哪里?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号