[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SpamAssassin PHP-MySQL User Interface Problems

From: "Teun Vink" <teun@moonblade.net>
> On Wed, 2002-08-28 at 16:51, Gene Grimm wrote:
> > [...]
> > I added the user name "spamby" to MySQL via webmin and set this in
> > config.inc.php as per the readme file. I confirmed the configured host,
> > and password by inserting an echo statement in the phpsa file. The
> > is that I get the below error messages and can't figure out why it is
> > to connect as root.

Please note: the script, to the best of my understanding, should NOT be
attempting to connect as "root", but rather as "spamby" being that this was
set in the script:

[from config.inc.php]
$dbhost = "localhost";
$dbuser = "spamby";
$dbpass = "somepassword";

[from phpsa.php]
    {start session here}
echo "Connecting to $dbhost as $dbuser<br>\n";  <<== This line added
$link = mysql_connect("$dbhost", "$dbuser", "$dbpass") or die ("Could not

After it reports "Connecting to localhost as spamby", the script spits out:

> > Warning: Access denied for user: 'root@localhost' (Using password: NO)
> > /var/www/phpsa/phpsa.php on line 16
> >
> > Warning: MySQL Connection Failed: Access denied for user:
> > (Using password: NO) in /var/www/phpsa/phpsa.php on line 16
> > Could not connect
> It looks like the root account does not have permission to access the
> database in mysql, so I'd suggest you verify that. More info on that can
> be found here: http://www.mysql.com/doc/en/Adding_users.html.

The account the script should be connecting as is "spamby", whose
permissions in mysql are as follows:

spamby@localhost, password encrypted, Select | Insert | Update | Delete

For the sake of argument, the permissions for "root@localhost" are:

root@localhost, password encrypted, All

Reply to: