Problems getting mysql to behave with php.
| From: | Eric Naujock | Date: | Tue, 14 Nov 2000 15:44:55 +0000 |
| Subject: | Problems getting mysql to behave with php. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-25191@lists.php.net to get a copy of this message | ||
For some reason I keep getting the following error back from any program or utility that uses PHP.
Anything that doesn't seems to have no problems connection.
I am running under RedHat 7.0 Stock.
I do Have magic_quotes_runtime turned on.
This is the error I keep getting back.
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 255
This happend to be in the utility phpMyAdmin.
I also get this error from the following code.
<?php
$connect = mysql_pconnect ("localhost","root");
echo "The result is:".$connect."<br>";
echo mysql_errno().": ".mysql_error()."<br>";
$select = mysql_select_db ("trustus");
echo ('The result is:'.$select.'<br>');
echo mysql_errno().": ".mysql_error()."<br>";
mysql_close ($connect);
?>
Yelds this result
Warning: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111) in /websites/trustus/noencrypt/db.test.php on line 2
The result is:
:
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111) in /websites/trustus/noencrypt/db.test.php on line 5
Warning: MySQL: A link to the server could not be established in
/websites/trustus/noencrypt/db.test.php on line 5
The result is:
:
Warning: Supplied argument is not a valid MySQL-Link resource in
/websites/trustus/noencrypt/db.test.php on line 8
Currently root has no password as I am tring to figure this out.
--------------------------------------------------------------------------------
Eric Naujock CCNA, CCDA, A+, Network +, I-Net +
Abacus II
5610 Monroe St.
Sylvania, Ohio 43560
<http://www.abacusii.com>
E-mail - naujocke@abacusii.com
Phone - 419-885-0082 X 241
Fax : 419-885-2717