From: Jeffrey B. <jef...@ya...> - 2008-01-30 16:49:35
|
I've done more mysql digging, and at Andrew's suggestion examined the content of mysql.user. We found that all of the *_priv fields were null for the vufind@localhost user. I reran the install script commands from the command line: > mysql> grant select,insert,update,delete on vufind.* to 'vufind'@'localhost' identified by 'xxx' with grant option; > Query OK, 0 rows affected (0.01 sec) > > mysql> flush privileges; > Query OK, 0 rows affected (0.00 sec) but the *_priv fields were still null, and PHP still reported errors. next I manually set the fields (sysadmins may cringe at this point (-: ) > mysql> update user set > -> select_priv = 'Y', > -> insert_priv = 'Y', > -> update_priv = 'Y', > -> delete_priv = 'Y' > -> where user = 'vufind'; > Query OK, 1 row affected (0.00 sec) > Rows matched: 1 Changed: 1 Warnings: 0 > > mysql> flush privileges; > Query OK, 0 rows affected (0.00 sec) and verified that it "took", but *still* get php error > An error has occured > > DB Error: connect failed > > [nativecode=Access denied for user 'vufind'@'localhost' (using password: YES)] > [966] /usr/local/php-5.2.5/lib/php/DB.php > [569] /usr/local/php-5.2.5/lib/php/PEAR.php > [1903] /usr/local/php-5.2.5/lib/php/DB/common.php > [252] /usr/local/php-5.2.5/lib/php/DB/mysql.php > [556] /usr/local/php-5.2.5/lib/php/DB.php > [2232] /usr/local/php-5.2.5/lib/php/DB/DataObject.php > [1879] /usr/local/php-5.2.5/lib/php/DB/DataObject.php > [411] /usr/local/php-5.2.5/lib/php/DB/DataObject.php > [73] /usr/local/vufind/web/services/MyResearch/Account.php I said to myself "is there another way?" (noting that there was no "on vufind.*" associated with mysql.user privileges. I checked and found: > mysql> show tables; > +---------------------------+ > | Tables_in_mysql | > +---------------------------+ > | columns_priv | > | db | > | func | > | help_category | > | help_keyword | > | help_relation | > | help_topic | > | host | > | proc | > | procs_priv | > | tables_priv | > | time_zone | > | time_zone_leap_second | > | time_zone_name | > | time_zone_transition | > | time_zone_transition_type | > | user | > +---------------------------+ AHAH! tables_priv looks promising. > mysql> describe tables_priv; > +-------------+-------------------------------------------------------------------------------------------------------------------------+------+-----+-------------------+-------+ > | Field | Type | Null | Key | Default | Extra | > +-------------+-------------------------------------------------------------------------------------------------------------------------+------+-----+-------------------+-------+ > | Host | char(60) | NO | PRI | | | > | Db | char(64) | NO | PRI | | | > | User | char(16) | NO | PRI | | | > | Table_name | char(64) | NO | PRI | | | > | Grantor | char(77) | NO | MUL | | | > | Timestamp | timestamp | NO | | CURRENT_TIMESTAMP | | > | Table_priv | set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') | NO | | | | > | Column_priv | set('Select','Insert','Update','References') *ALMOST THERE!* > mysql> select * from tables_priv where user ='vufind'; > Empty set (0.00 sec) > > mysql> select count(*) from tables_priv; > +----------+ > | count(*) | > +----------+ > | 0 | > +----------+ > 1 row in set (0.00 sec) *DUH????* Back to square one. vufind, nor anyone else has *any* table privs. Sanity and caution tells me not to do more manual interventions here. Why isn't the GRANT working? There must be some basic part of mysql not installed correctly Where to look next? Remember, despite the content of the tables I looked at 'vufind'@'localhost' actually *can* select, update and delete (havn't tried insert). Jon Gorman wrote: > I've had similar errors when the configuration files for vufind > didn't have the right info for mysql. > > > I'd double-check the password. I need to wait till I get home and > look at my local machine, but you might also want to double-check the > domain. Depending on the mysql setup, you may not want > vufind@localhost but something else vufind@127.0.0.1 or just vufind > maybe? Of course, if doing vufind@localhost works from the command > line that's not likely to be the issue. > > > Jon > > On Jan 29, 2008 11:39 AM, Andrew Nagy <and...@vi...> wrote: >> I still think something is not configured properly with mysql. >> >> The following error that you are reporting: >> "Access denied for user 'vufind'@'localhost'" >> is a MySQL error and not a PHP error. >> >> This means that PHP is able to connect to the MySQL server but is unable to authenticate with the vufind user account. >> Can you send the output of the mysql.user table? >> >> Thanks >> Andrew >> >>> -----Original Message----- >>> From: Jeffrey Barnett [mailto:jef...@ya...] >>> Sent: Tuesday, January 29, 2008 9:17 AM >>> To: Andrew Nagy >>> Subject: Re: PHP Config problems using Solaris >>> >>> Command line usage works fine. I don't think mysql or the vufind >>> database is misconfigured. the server seems to be using the wrong >>> password ("YES") in the connection request. >>> >>> Andrew Nagy wrote: >>>>> I know this is a config problem, but as the config.ini file I >>>>> submitted, shows, I did supply a password (masked) for the vufind >>>>> mysql user. >>>>> Where do I go next to find why that info is not making it into the >>>>> runtime environment? >>>> Try logging into mysql directly with this information. To do so try >>> the following from the commandline: >>>> mysql -u vufind -p vufind >>>> >>>> You will then be prompted to enter a password. If this fails, then >>> you have your mysql account setup incorrectly. >>>> Andrew >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> VuFind-General mailing list >> VuF...@li... >> https://lists.sourceforge.net/lists/listinfo/vufind-general >> |