按要求寫好只好出錯Access denied for user
按照老師的那些做法寫好之后運行了一下卻發現發生以下的錯誤:
java.sql.SQLException: Access denied for user 'SighFate'@'localhost' (using password: YES)
但是我在配置jdbc的時候卻是以下的配置:
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEncoding=UTF8
username=root
password=root
有人能告訴我為什么會發生這樣的事情,還有應該怎么解決嗎?
2016-05-28
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEncoding=utf8
jdbc.username=root
jdbc.password=708242
寫成這樣!
2016-08-08
你們好牛逼,我搞了一個晚上,網上各種搜不行,忽然看到這邊的問答,66666
2016-05-29
樓上正解,還有一種解決方案:
把spring-dao.xml的xsd文件換掉:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
? ? ?xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
? ? ?xmlns:context="http://www.springframework.org/schema/context"
? ? ?xsi:schemaLocation="http://www.springframework.org/schema/beans
? ? ? ?http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
? ? ? ?http://www.springframework.org/schema/context
? ? ? ?http://www.springframework.org/schema/context/spring-context-3.0.xsd">
2016-05-16
換個數據庫連接池
2016-05-13
已經有類似的問題了,我按照提示中去做。現在已經成功了。。