数据库连接问题?

feixue086 2004-11-21 02:39:30
代码:
$connect=@mysql_connect("localhost", "root", "");
mysql_select_db("AddBook", $connect);

错误提示:
Warning: Supplied argument is not a valid MySQL-Link resource in c:\apache\htdocs\addbook\index.php on line 121
...全文
61 点赞 收藏 7
写回复
7 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
anguskwan 2004-11-22
re~
回复
jxflll 2004-11-21
密码不对!
回复
feixue086 2004-11-21
Warning: Access denied for user: 'root@localhost' (Using password: NO) in c:\apache\htdocs\addbook\index.php on line 21
改成这样$connect=mysql_connect("localhost", "root", "");
还是有错误:

Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO) in c:\apache\htdocs\addbook\index.php on line 21

Warning: Supplied argument is not a valid MySQL-Link resource in c:\apache\htdocs\addbook\index.php on line 22

Warning: Supplied argument is not a valid MySQL result resource in c:\apache\htdocs\addbook\index.php on line 25
回复
-神仙- 2004-11-21
$connect=mysql_connect("localhost", "root", "");
看看是什么错误
回复
uuq 2004-11-21
错误不是这里
回复
feixue086 2004-11-21
服务起来了啊
回复
hahawen 2004-11-21
数据库联接错误, 你本地的mysql服务起来了吗?
回复
相关推荐
发帖
基础编程
创建于2007-09-28

2.1w+

社区成员

从PHP安装配置,PHP入门,PHP基础到PHP应用
申请成为版主
帖子事件
创建了帖子
2004-11-21 02:39
社区公告
暂无公告