为纪念myeclipse:error while performing database login with the ### driver而生
2018-03-23 16:21
531 查看
![](http://static-blog.csdn.net/xheditor/xheditor_emot/default/laugh.gif)
先发个表情,纪念一下我现在的心情。
用myeclipse搭建框架,数据库用的是mysql。创建数据库连接时出现了error while performing database login with the ### driver错误。需要注意下图标注的部分。这个界面中只要有一个填写错误,就会无法成功连接。
1、若使用的是mysql数据库,Driver template: Mysql connector/j(下拉框进行选择)
2、driver name: (我这里填写的是,建立的web project的名字)
3、重点 我前几次试了的,connection URL用的是下面的格式,一直不成功。
connection URL: jdbc:mysql://localhost:3306/数据库名称
改写为 connection URL: jdbc:mysql:///数据库名称
就成功了
4、User name: 用户名
5、password: 密码 (数据库密码)
6、重点 Driver jars: 添加jar包mysql-connector-java-5.1.7-bin.jar(看了别的资料说最好路径是英文,不清楚是否真的有影响,我的路径是全英文。)
原因 : 前几次尝试不成功用的是 Driver jars: 添加jar包mysql-connector-java-5.1.40-bin.jar 不知道是jar版本太新,还是怎么回事,在我的电脑上不能用,但是在师兄的电脑上是可以的,所以也不一定是jar的原因,如果其他框的内容,都确保正确了还没有连接成功的情况下,可以尝试换一下jar包。
7.重点 前几次用的是mysql-connector-java-5.1.40-bin.jar 时,Driver classname项默认的是com.mysql.fabric.jdbc.FabricMySQLDriver。在网上找解决办法时,很多都建议把Driver classname:改成com.mysql.jdbc.Driver。但是界面就自动提示错误,且找不到com.mysql.jdbc.Driver包。所以我就换成了版本低的jar包。后来,下拉框即出现了Driver
classname: com.mysql.jdbc.Driver(下拉框进行选择)
为解决这个错误3/6/7项来回更改了很多次,到此,才把问题解决。截个成功的图贴上。
![](http://static-blog.csdn.net/xheditor/xheditor_emot/default/struggle.gif)
好辛苦,这个问题占了大半天的时间。
相关文章推荐
- 在MyEclipse中配置Oracle10g的连接报错:error while performing database login with the oracle driver
- 在MyEclipse中配置Oracle10g的连接报错:error while performing database login with the oracle driver
- myeclipse error while performing database login with the MySQL driver
- Myeclipse连接Mysql数据库时报错:Error while performing database login with the pro driver:unable
- MyEclipse中连接mysql数据库提示error while performing database login with the testMySQL driver check your url
- MyEclipse中连接mysql数据库提示error while performing database login with the testMySQL driver check your url
- Error while performing database login with the sqljdbc driver:Unable to create connection. Check your URL.
- Error while performing database login with the Mysql connector driver;Unknown database 'test'
- error while performing database login with the Dome driver:unable to create connection.check yoururl
- eclipse中配置连接db2异常(error while performing database login with the db2 driver;unable to create connec)
- Error while performing database login with the com.mysqtest driver
- Error while performing database login with the mysql driver
- error while performing database login with the mysql driver 的解决方法
- eclipse : Error while performing database login with the driver null
- error while performing database login with the oracle driver
- eclipse : Error while performing database login with the driver null
- error while performing database login with the oracle driver
- Error while performing database login with the sqljdbc driver:Unable to create connection. Check you
- Error while performing database login with the XXX driver:Io 异常: The Network Adapter could not estab
- error while performing database login with the DriveName driver