Hola, MySQL wizards.

I'm using LAMP on Fedora Core 2. Some kind soul produced a tutorial on the net and the first script, <birthdays_create_database.php>, I am trying to use yields an error in the browser of: < Couldn't connect to MySQL > Here is the script. -------------------------------
<html><head><title>Birthdays Create Database</title></head>
<body>
<?php
$dbhost = 'localhost';
$link = mysql_connect($dbhost);
if (! $link)
die("Couldn't connect to MySQL");
//create database
mysql_create_db("mydatabase")or die("Create Error: ".mysql_error());
mysql_close($link);
?>
</body>
</html>
---------------------------
I can access all of my databases and tables with phpMyAdmin just fine, and I can access them at the command line. Of course I didn't know which user I was when was attempting to execute this php script through the browser, so I check my mysqld.log file and it claims I should be '[EMAIL PROTECTED]', so I setup this user in the mysql database.


I tried adding
$dbuser = 'nobody';
$dbpass = '';
to the script but to no avail even though I can access through the command prompt with <mysql -u nobody -p> with a <null> password.


When I do a <ps -elf | grep mysql> the results show a --port=3306 as well as 10 connection PID's. My hello.php script works fine, as do other php scripts.

When I list <netstat -l | grep mysql*> however, the number that gets displayed in the column after <STREAM LISTENING> and before </var/lib/mysql/mysql.sock> is 999269. I was expecting it to be 3306?

How do I troubleshoot this <Cannot connect to MySQL> error message? My mysqld.log looks "normal" other than a "Warning: Asked for 196608 thread stack, but got 126976>. The mysql.sock line shows <port: 3306>.

Any ideas on what to check next? I'd at a loss.

TIA
Andrew L. in the Heartland (not the "Hinterlands")

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to