Philipp wrote on Fri, 24 Dec 2004 10:30:04 +0100:
??>> Confirm that it's actually working with the mysql command-line client.
P> No problem there:
??|> ~/tools/mysql >./bin/mysql -u root -p ??|> Enter password: ??|> Welcome to the MySQL monitor. Commands end with ; or \g. ??|> Your MySQL connection id is 2035 to server version: 4.0.17 ??|> ??|> Type 'help;' or '\h' for help. Type '\c' to clear the buffer. ??|> mysql>>> create database wikidb2; ??|> Query OK, 1 row affected (0.01 sec) ??|> mysql>>> drop database wikidb2; ??|> Query OK, 0 rows affected (0.50 sec)
??>> Check for bogus blank root users.
P> Hm, I'm not too far into DB administration; is one of these suspicious?
mysql>> select host,user from user; P> +---------------------------+----------+ host |>> user | P> +---------------------------+----------+ ??|> % | root | ??|> % | sqluser | ??|> % | wikiuser | ??|> xxxxxx01.de.company.com | root | localhost |>> root | localhost |>> sqluser | localhost |>> wikiuser | ??|> localhost.localdomain | root | ??|> localhost.localdomain | sqluser | ??|> localhost.localdomain | wikiuser | P> +---------------------------+----------+
Please check that ALL root users have the same rights.
Because when you connect from shell, and when you connect with PHP and Apache you probably DO NOT connect as the same user.
Run from shell (after logging to the mysql): SHOW PROCESSLIST;
You should get result in form: id, user, host:socket, db,...
and put the same comand in use from php, and if host is different, you have found the problem!
HTH
-- God speed