Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c3p0数据库连接池连接不了MySQL,什么原因呢 #11

Open
wangwoods opened this issue Oct 31, 2017 · 9 comments
Open

c3p0数据库连接池连接不了MySQL,什么原因呢 #11

wangwoods opened this issue Oct 31, 2017 · 9 comments

Comments

@wangwoods
Copy link

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES).....
jdbc连上MySQL了,应该不是MySQL和root密码的问题

@wudouxingjun
Copy link

我也是同样的问题,正在找解决方法

@jackzhengpinwen
Copy link

我可以正常运行饿

@lihanxiang
Copy link

表的名称不对吧

@pengest
Copy link

pengest commented Mar 4, 2018

注意database的名称,和的名称。
c3p0-config.xml
<property name="jdbcUrl">jdbc:mysql://localhost:3306/customer</property>
以上customer是database的名称。

@lihanxiang
Copy link

报错的原因是,没有连接上数据库,你需要输入自己的数据库名称

@499704069
Copy link

终端可以连接MySQL,可以使用customer数据库,但是运行项目添加客户还是出现java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)问题,这是什么原因?

@codingXiaxw
Copy link
Owner

codingXiaxw commented Sep 27, 2018 via email

@499704069
Copy link

我把jdbc:mysql://localhost:3306/customer中的localhost改为127.0.0.1就可以了,有啥区别吗?

@codingXiaxw
Copy link
Owner

codingXiaxw commented Sep 27, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants