From: Dan F. <dfr...@cs...> - 2004-07-26 00:49:54
|
I just wrote a detailed email message .. which got lost because of bad connectivity. This is MySQL stuff, not Phpwiki, and it's too hard to teach MySQL admin over email. I will take one more shot, but I can't spend too much time on this. First, I don't know why you are getting "Link to server lost, unable to reconnect." I don't understand. Understand that MySQL perms are per (user, host) pair, not per user. Also, localhost is a special host, probably not included in '%' (wildcard). Read maybe http://dev.mysql.com/doc/mysql/en/Privileges.html. Also, localhost connections are made via a named pipe socket. Read http://dev.mysql.com/doc/mysql/en/Problems_with_mysql.sock.html and check mysql --help to see what the socket is. Maybe try: - Try granting perms to (user, localhost) (I only see perms on (user, %) below). - Try connecting as (user, <machine>) instead of localhost. - Try granting ALL perms to one of those instead of just documented perms. - Try running the exact same SQL from the command-line tool, making sure to log in with exactly the same user, host, and socket (if localhost). Dan Arthaey Angosii wrote: >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. :) > > >------------------------------------------------------- >This SF.Net email is sponsored by BEA Weblogic Workshop >FREE Java Enterprise J2EE developer tools! >Get your free copy of BEA WebLogic Workshop 8.1 today. >http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click >_______________________________________________ >Phpwiki-talk mailing list >Php...@li... >https://lists.sourceforge.net/lists/listinfo/phpwiki-talk > > |