From: Arthaey A. <ar...@gm...> - 2004-07-25 20:19:37
|
(Note: I also posted this to the Sourceforge support forum, but you've all said the mailing list gets read more often.) Everything was working fine with my PhpWiki installation. But today I installed phpMyAdmin so I could look at the MySQL tables more easily, and after I got that working, the wiki no longer loads. Instead, I get this error: <begin error> Fatal PhpWiki Error lib/WikiDB/backend/PearDB.php:779: Fatal[256]: wikidb_backend_mysql: fatal database error * DB Error: unknown error * (SELECT linkee.id as id, linkee.pagename as pagename, linkee.hits as hits, linkee.pagedata as pagedata FROM link, page AS linker, page AS linkee WHERE linkfrom=linker.id AND linkto=linkee.id AND linker.pagename='HomePage' ORDER BY linkee.pagename [nativecode=1 ** Can't create/write to file '/root/tmp/#sql_f5b_0.MYI' (Errcode: 13)]) * Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0 </end error> I'm not very familiar with sql, so any hints on where to start looking for the cause of this would be greatly appreciated! -- AA |
From: Dan F. <dfr...@cs...> - 2004-07-25 21:27:30
|
Arthaey Angosii wrote: >(Note: I also posted this to the Sourceforge support forum, but you've >all said the mailing list gets read more often.) > >Everything was working fine with my PhpWiki installation. But today I >installed phpMyAdmin so I could look at the MySQL tables more easily, >and after I got that working, the wiki no longer loads. Instead, I get >this error: > ><begin error> > >Fatal PhpWiki Error > >lib/WikiDB/backend/PearDB.php:779: Fatal[256]: wikidb_backend_mysql: >fatal database error > > * DB Error: unknown error > * (SELECT linkee.id as id, linkee.pagename as pagename, >linkee.hits as hits, linkee.pagedata as pagedata FROM link, page AS >linker, page AS linkee WHERE linkfrom=linker.id AND linkto=linkee.id >AND linker.pagename='HomePage' ORDER BY linkee.pagename [nativecode=1 >** Can't create/write to file '/root/tmp/#sql_f5b_0.MYI' (Errcode: >13)]) > * > > I do not know what this error means exactly. However, I'll say this: 1. I think MySQL is sad, not Phpwiki. 2. I Googled for mysql "Can't create/write to file" and found this page. Maybe it helps: http://dev.mysql.com/doc/mysql/en/Cannot_create.html It says to use "perror" to find out about the error code. I did it with yours: % perror 13 Error code 13: Permission denied 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). Look into file permissions. Dan > >Warning: Unknown(): A session is active. You cannot change the session >module's ini settings at this time. in Unknown on line 0 > ></end error> > >I'm not very familiar with sql, so any hints on where to start looking >for the cause of this would be greatly appreciated! > > > > |
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. :) |
From: Dan F. <dfr...@cs...> - 2004-07-26 00:41:14
|
These are really not Phpwiki questions, they are MySQL questions. As such, I'd advise learning a little more about MySQL in general. Read the docs at mysql.com in some detail about configuration. I fear replying to any more of this, because I'll just attract further MySQL questions. It's too hard to teach over email. However, I will give one more shot, though it's a guess. First, you have to realize that MySQL does not grant permissions to users. Rather, it grants permission to (user, host) pairs. Furthermore, localhost is a special kind of host, different from others. The '%' is a wildcard for any host, but I believe it does not include localhost. Thus, if you've granted permissions to user@%, that is different from permissions for user@localhost. From the below, it looks like you don't have any perms for user@localhost, yet your phpwiki config looks like it is trying to use that. So you should grant them to user@localhost, or change your Phpwiki dsn to use user@<machine>. Sounds like maybe you did some of this (you made a "duplicate" user, who's not really duplicate since it's a different host, but I'm not sure what its perms are). Furthermore, if it still doesn't work, I'd try granting all perms instead of just what it says in the docs. Finally, make sure when you test perms at the command line, that you are using exactly the same connection as for Phpwiki (e.g., your socket must also be the same if you use localhost, not obvious from below; read for example http://dev.mysql.com/doc/mysql/en/Problems_with_mysql.sock.html and use mysql --help to see which socket it is connecting to). Please, no more. :-) It's too hard to teach someone how to use MySQL over email. 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 > > |
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 > > |
From: Arthaey A. <ar...@gm...> - 2004-07-28 19:05:25
|
To wrap this up: In addition to the problems previously fixed in this thread, I also had reset the wiki user's password, to make sure I knew what it was. Except, clumsy me, I typo'd the password so that it no longer matched the password in config.ini. So now my wiki is back up and running. Thanks for the help with the other issues I was having! :) -- AA |