Re: apache+php+mysql problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Ding Li <achillis2002@xxxxxxxxx> wrote:
[...]
> |cd $HOME|
> |mkdir public_html|
> |echo "my homepage" > public_html/index.html|
> |chmod a+x $HOME $HOME/public_html|
> |chmod a+r $HOME/public_html/index.html|

Nice tip ;) I forgot to do that.
 
[...]
> 7. http://localhost/~username/database.php
> 
> |It works fine until the last step(7th step).I didn't get the correct 
> result. Instead, I got an error
> 
> PHP database example - http://iki.fi/karvinen.
> 
> *Warning*: mysql_connect(): Access denied for user: 'root@localhost' 
> (Using password: NO) in */home1/dingli/public_html/database.php* on line *8*
> Could not connect : Access denied for user: 'root@localhost' (Using 
> password: NO)

I guess you forgot to add '' place holder for the password, like:
$dbh = mysql_connect('localhost','root','');

Hope that helps & sorry if someone already replied ;)

regards,
Ossama Khayat
Arabeyes.org member


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux