当前位置:网站首页>[SSM] an error is reported that the user name of the access denied for user 'WYF' @ 'localhost' (using password: yes) data becomes the user name of the computer
[SSM] an error is reported that the user name of the access denied for user 'WYF' @ 'localhost' (using password: yes) data becomes the user name of the computer
2022-06-28 23:22:00 【waiting971118】
Access denined for user 'WYF'@'localhost' (using password: YES)
Error message
Integrate SSM When , The error message of loading the database is as follows ( Only part of it was intercepted ):
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:82)
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:68)
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:271)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:69)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:56)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:259)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:132)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
... 41 more
Caused by: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:527)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
... 51 more
Debug The following error message appears :( among WYF It's the user name of the computer )
Access denied for user 'WYF'@'localhost' (using password: YES)
resolvent
First step : First check jdbc.propertites In the configuration file driver,url,user,password The configuration of is correct
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEncoding=utf8
username=root
password=123456
The second step : see MySQL Medium user jurisdiction ( You can leave it alone , Try step three directly )
use mysql
select host, user from user;
update user set host ='%' where user='root';
The third step : The user name is displayed due to an error , So there should be a problem when importing the configuration ,
Check out my spring-dao.xml The configuration file :
The original configuration
<context:property-placeholder location="classpath:jdbc.properties"/>
It is amended as follows :
<context:property-placeholder location="classpath:jdbc.properties" system-properties-mode="NEVER"/>
Problem solving .
边栏推荐
- Tanghongbin, Yaya live CTO: to truly localize, the product should not have the attribute of "origin"
- 直击产业落地 | 飞桨重磅推出业界首个模型选型工具
- TDD case practice
- Do you know all the wonderful functions of the vlookup function?
- 融云通信解决方案 破解企业沟通痛点
- [deep learning] (3) encoder mechanism in transformer, complete pytoch code attached
- [stm32 Hal library] serial port communication
- 国盛证券开户是真的安全可靠吗
- TDD案例实战
- 2022 PMP project management examination agile knowledge points (4)
猜你喜欢

【狀態機設計】Moore、Mealy狀態機、三段式、二段式、一段式狀態機書寫規範
![[matlab]函数定义与使用](/img/43/a7970ca8e075151277f7773434f7db.png)
[matlab]函数定义与使用

华为22级专家十年心血终成云原生服务网格进阶实战文档,是真的6

Go language - reflect

融云通信解决方案 破解企业沟通痛点
![[Chapter 2 of word tutorial series] how to set the table on each page to have a header in word](/img/1a/8416d2c48bf1ddcc45e0c5d9acf242.png)
[Chapter 2 of word tutorial series] how to set the table on each page to have a header in word

见丰知夏|国漫鼻祖丰子恺,数字藏品独家发售

【状态机设计】Moore、Mealy状态机、三段式、二段式、一段式状态机书写规范

Web API learning notes 1

Linq连表查询
随机推荐
Serious internal entanglement in the we media industry: where should the enterprise we media go
Advice to friends
Leetcode 324 swing sort ii[sort double pointer] the leetcode path of heroding
C interview questions_ 20220627 record
云计算的迷路者
frameworks/base/core/res/res/values/symbols. Xml:3915: error: no definition for declared symbol solution
I can't sleep
C language - word analysis
TDD案例实战
Mathematical knowledge: finding combinatorial number I - finding combinatorial number
O & M troubleshooting - use hcache plug-in to troubleshoot excessive buffer/cache occupancy
Would like to ask, how to open a stock account? Is it safe to open an account online?
月薪6万,互联网“降本增效”后,这类人开始被疯抢
Complex nested object pool (4) -- manage the object pool of multi class instances and multi-stage instances
[stm32 Hal library] RTC and BKP drives
Junior, it's not easy!
MATLAB 学习笔记(6)MATLAB 的 upsample 函数和 downsample 函数
Is it difficult to register stocks and open accounts online? Is it safe to open an account online?
在DialogFragment的onStop(完全不可见)时调用dismiss退出界面报错解决办法
计数排序和排序的稳定性