Re: mysql --> php

From: Date: Sun, 08 Apr 2001 19:38:37 +0000
Subject: Re: mysql --> php
References: 1  Groups: php.install 
Request: Send a blank email to php-install+get-2711@lists.php.net to get a copy of this message
> I have a fresh instalation of mysql from the ditribution of RH7. > What do I have to put into the user and host tables so that > I can use MySQL through PHP (I doesn't have to be super-secure, > just so that not everybody could get to my databases) > > Btw. > Now I get this error when trying to use mysql in a php script: > Warning: MySQL Connection Failed: Can't connect to local MySQL server > through socket '/var/lib/mysql/mysql.sock' (111) in lib.inc.php3 on line 97 > Error > I'm sure that mysql server is running. Type: mysqladmin variables and check where the socket is. Then put that socket location in your mysql_connect() call. See the docs for the exact syntax. Also see the MySQL docs for how to grant access to specific users. You will want to do a GRANT for your web server user id, or whatever user you wish to connect to MySQL as from your web interface. -Rasmus

« previous php.install (#2711) next »