Re: php script connect to mySQL problem
| From: | Vu Hoang Huynh | Date: | Mon, 07 Jan 2002 02:03:00 +0000 |
| Subject: | Re: php script connect to mySQL problem | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-15472@lists.php.net to get a copy of this message | ||
Yes, mysqld was running.
Username and password were provided
via this function call
$db = mysql_connect("localhost","username","password");
I have to same problem when trying to connect to mysql
server whenever I use any user other than root. So basically whenever I try
to run "mysql" using root account then everything is fine but otherwise I'll
get the same error message. Thanks to your reply.
"Miles Thompson" <milesthompson@ns.sympatico.ca> wrote in message
news:5.0.2.1.0.20020106215447.01e4cbe0@pop1.ns.sympatico.ca...
>
> Is mysqld running?
> Username?
> Password?
>
>
> At 08:30 PM 1/6/2002 -0500, Vu Hoang Huynh wrote:
> >Hi all,
> >
> >I'm a newbie to PHP and mySQL and I'm currently running PHP+mySQL on my
> >Linux 2.2.16 kernel. Every time I try to connect to mySQL from a php
page, I
> >get this error message:
> >
> >ERROR 2002: Can't connect to local MySQL server through socket
> >'/var/lib/mysql/mys
> >ql.sock' (111)
> >
> >What does that mean and how do I go about solving it?
> >
> >Thanks in advance for your directions and have a great new year.
> >
> >Best regards,
> >
> >
> >
> >
> >--
> >PHP Database Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> >For additional commands, e-mail: php-db-help@lists.php.net
> >To contact the list administrators, e-mail: php-list-admin@lists.php.net
>