Access denied for user 'cl41'@'localhost' (using password: YES)

point_net 2008-10-07 11:55:07
用tomcat连接数据库MySQL出现Access denied for user 'cl41'@'localhost' (using password: YES)
是什么意思啊?
...全文
148 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
xtbzqw 2008-10-09
  • 打赏
  • 举报
回复
估计是你的mysql没有设密码,或者是你设的密码和你访问用的密码不一样啊,仔细看一看你的mysql安装时的密码
mengweilil 2008-10-09
  • 打赏
  • 举报
回复
......
point_net 2008-10-08
  • 打赏
  • 举报
回复
又有新错了。。。。。。Incorrect database name ':3306/mysqldemo'
mengweilil 2008-10-08
  • 打赏
  • 举报
回复
String url = "jdbc:mysql://localhost:3306/mysqldemo?user=root&password=070511055";

用 & 分割
yk789 2008-10-08
  • 打赏
  • 举报
回复
password=070511055 这是你的密码吗?
point_net 2008-10-08
  • 打赏
  • 举报
回复
这是我测试程序的原代码:
<%@ page contentType="text/html; charset=gb2312" %>

<%@ page language="java" %>

<%@ page import="com.mysql.jdbc.Driver" %>

<%@ page import="java.sql.*" %>

<%

//驱动程序名

String driverName="com.mysql.jdbc.Driver";//还想问下驱动名去哪里查?



String url="jdbc:mysql://localhost/:3306/mysqldemo?user=root;password=070511055";

Class.forName("com.mysql.jdbc.Driver");

Connection connection=DriverManager.getConnection(url);

out.print("数据库操作成功,恭喜你");




%>
mengweilil 2008-10-08
  • 打赏
  • 举报
回复
贴代码

什么叫root;password=07啊?

肯定链接字符串写错了
point_net 2008-10-08
  • 打赏
  • 举报
回复
哦,我忘了写改了之后的错误提示了。。。。。。Access denied for user 'root;password=07'@'localhost' (using password: NO)
mengweilil 2008-10-08
  • 打赏
  • 举报
回复
你mysql的安装用户名是什么?


默认应该是root,密码是什么?
point_net 2008-10-08
  • 打赏
  • 举报
回复
改怎么解决呢?
mengweilil 2008-10-08
  • 打赏
  • 举报
回复
Access denied for user 'cl41'@'localhost'

显然你没用root啊
point_net 2008-10-08
  • 打赏
  • 举报
回复
密码没错啊,用户名我没改过所以用的root,没错吧?
startym 2008-10-08
  • 打赏
  • 举报
回复
或者权限不够!
startym 2008-10-08
  • 打赏
  • 举报
回复
用户名或密码错误!
zhj92lxs 2008-10-08
  • 打赏
  • 举报
回复
密码错了?

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧