At 22:00 30-5-01 +1000, Steve Sapsford wrote:

>hi ppl,
>
>i am a newbie running apache, php & mysql on a redhat 7 server...
>
>i am getting the following error when i browse to my php file which access 
>my database called steve:
>
>
>======================================================
>
>Warning: MySQL Connection Failed: Can't connect to local MySQL server 
>through socket '/var/lib/mysql/mysql.sock' (111) in 
>/var/www/html/bookorama/index.php3 on line 7

This is a faq. Caused by one of these:
- wrong location of mysql.sock in php.ini
- wrong location for mysql.sock in /etc/my.cnf


>Warning: Supplied argument is not a valid MySQL-Link resource in 
>/var/www/html/bookorama/index.php3 on line 9

Line 9 doesn't mean it has to be line 9..

Take a look at some of the tutorials.. www.devshed.com has a real nice one.

Bye,




B.




>====================================================
>
>here is the index.php file:
>
>====================================================
>
><?php $db = mysql_connect("localhost", "root", "new-password"); 
>mysql_select_db("steve",$db); ?>
>===================================================
>
>i can access mysql and this database no problems via the linux box using 
>mysqladmin etc
>
>
>i would be grateful if someone could point me in the right direction....
>
>thanks in advance
>
>steve


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to