(急)mySQL连接不上?

flyingstar2008 2009-03-07 01:25:22
调试程序时出现了下面的问题:(MySQL服务是启动了的)


Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in D:\MYOA\webroot\liuyanban\index.php on line 2

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user: 'ODBC@localhost' (Using password: NO) in D:\MYOA\webroot\liuyanban\index.php on line 3

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in D:\MYOA\webroot\liuyanban\index.php on line 3

Warning: mysql_query() [function.mysql-query]: Access denied for user: 'ODBC@localhost' (Using password: NO) in D:\MYOA\webroot\liuyanban\index.php on line 4

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in D:\MYOA\webroot\liuyanban\index.php on line 4

Warning: mysql_query() [function.mysql-query]: Access denied for user: 'ODBC@localhost' (Using password: NO) in D:\MYOA\webroot\liuyanban\index.php on line 6

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in D:\MYOA\webroot\liuyanban\index.php on line 6

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in D:\MYOA\webroot\liuyanban\index.php on line 7
...全文
101 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
老哥讲数据库 2009-03-07
  • 打赏
  • 举报
回复
你可以看看我的博客,里面有一篇专门介绍用户和权限的原理的,相信对你有帮助的。
fcoolx 2009-03-07
  • 打赏
  • 举报
回复
ACMAIN_CHM 已经说的很细了


或者把D:\MYOA\webroot\liuyanban\index.php 第二行 改成你能登陆的用户名密码
[Quote=引用 2 楼 flyingstar2008 的回复:]
我是新手,能不能详细说下步骤啊?
[/Quote]
flyingstar2008 2009-03-07
  • 打赏
  • 举报
回复
我是新手,能不能详细说下步骤啊?
ACMAIN_CHM 2009-03-07
  • 打赏
  • 举报
回复
你没授权给 'ODBC@localhost'

从mysql工具以root登录,然后 grant all on *.* to ODBC@%;

56,687

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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