Hi there
The database is now running, i've created my tables and put the data
inside. This is fine.
Next step is to create a PHP-Website which communicates with the
database, but i am not able to connect over my apache (this is what it
seems to me).
to log into the database I use
> mysql -p dkv
(password is ppp
user is dcp)
anything is ok.
my php-script looks like this:
<?php
$host = "localhost";
$user = "dcp";
$pass = "ppp";
$conex = mysql_connect($host, $user, $pass);
if($conex)
{
echo "Connection established.<br>\n";
mysql_close();
}
else
{
echo "No Connection<br>";
echo mysql_errno() . ":" . mysql_error . "<br>";
}
?>
If I put this into a file on the server and access it with my browser,
I get this error:
Warning: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2) in /eshop/apache/share/htdocs/sql/ connect.php on
line 5
Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/tmp/mysql.sock' (2)
in /eshop/apache/ share/htdocs/sql/connect.php on line 5
No Connection
2002:mysql_error
What am I doing wrong? Could it be, that i don't have the necessary
modules loaded into my apache? I am new to this, please be kind with me
:-))))
Thanks in advance
dcp
---------------------------------------------------------------------
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