编程论坛's Archiver

wyyuan 发表于 2007-1-31 16:05

mysql 和php连接

&lt;?php<BR>$hostname='localhost';<BR>$username='new';<BR>$password='';<BR>if (mysql_connect("$hostname","$path","$username","$password"))<BR>{<BR>echo "与mysql服务器连接成功&lt;br&gt;";<BR>echo "ID:".$mysqlid;<BR>}<BR>else {<BR>echo mysql_errno();<BR>echo mysql_error();<BR>}<BR>?&gt;<BR><BR>为什么老出现如下提示呢?<BR>1045Access denied for user <a href="mailto:'ODBC'@'localhost'" target="_blank" >'ODBC'@'localhost'</A> (using password: YES)

rainic 发表于 2007-1-31 21:04

$path是什么???<br>$mysqlid=mysql_connect($hostname,$username,$password)<br>这样应该就可以了

wyyuan 发表于 2007-2-1 11:22

thanks for your help , it had been solved according to your information .

google 发表于 2007-2-1 11:35

呵呵

jzcxh 发表于 2007-2-28 13:16

[em05]

yutaozj 发表于 2007-3-11 17:42

呵呵呵,楼主这里明显有不对的地方呢!~

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.