The following code fails for some reason: (lifted almost verbatim from a text book)
Code: Select all
$myconnection= @mysql_connect('localhost', 'testuser', 'mypassword');
if (!$myconnection) {
exit('<p>Unable to connect to the ' .
'database server at this time.</p>');
}Code: Select all
C:\Program Files\MySQL Server 4.1\bin> mysql -h localhost -u testuser -p
Enter password: **********
Welcome to the MySQL monitor.
...Any ideas what I might be doing wrong?
(Thanks in advance!)