From: Arthaey A. <ar...@gm...> - 2004-07-25 22:46:11
|
Continuing to work at this problem, I set MySQL's my.cnf to include: ==================== [mysqld] tmpdir=/var/lib/mysql/tmp ==================== After restarting mysqld, I got a different error message, one with a surprising about of useless links from Google: ==================== lib/WikiDB/backend/PearDB.php:35: Fatal[256]: Can't connect to database: wikidb_backend_mysql: fatal database error * DB Error: connect failed * ( [nativecode=Link to server lost, unable to reconnect] ** mysql://wiki:XXXXXXXX@localhost(/var/lib/mysql/mysql.sock)/phpwiki) * ==================== The MySQL user wiki's information is thus, according to phpMyAdmin: ==================== User Host Type Privileges Grant wiki % database-specific SELECT, INSERT, UPDATE, DELETE, LOCK TABLES No ==================== Which is what doc/INSTALL.mysql says is all that's required for the wiki user. Dan Frankowski wrote: > Thus, probably that file doesn't have permissions to be read by the user > who's making the Phpwiki request (probably the user running your Apache > process). Next, I tried investing permissions further. I set apache as the user and group of /var/lib (which contains the mysql directory); the permissions had previously been set to root. New error message: ==================== lib/WikiDB/backend/PearDB.php:35: Fatal[256]: Can't connect to database: wikidb_backend_mysql: fatal database error * DB Error: connect failed * ( [nativecode=Access denied for user: 'wiki@localhost' (Using password: YES)] ** mysql://wiki:XXXXXXXX@localhost(/var/lib/mysql/mysql.sock)/phpwiki) ==================== This was surprising, since wiki certainly *used* to have permissions. But lo and behold, when I tried to access the MySQL database from the command line: ==================== [root@localhost var] $ mysql -u wiki -p phpwiki Enter password: ********** ERROR 1045: Access denied for user: 'wiki@localhost' (Using password: YES) ==================== The MySQL command "show grants for 'wiki'@'localhost'" showed that there were NO privileges for wiki -- but they were set for wiki@%. I made a duplicate user, wiki@localhost, that fixed the problem of logging in as wiki from the command line. However, that put me back to the "Link to server lost, unable to reconnect" error message. I'm out of ideas; what should I try next? -- AA PS -- Thanks for your quick reply. :) |