## Forum archive 2000-2006

### Robin Cruz - RHE4 Installation Problem: DBI connection failure

by Arnold Pizer -
Number of replies: 0
 RHE4 Installation Problem: DBI connection failure topic started 7/20/2006; 2:38:02 PMlast post 7/24/2006; 10:57:30 PM
 Robin Cruz - RHE4 Installation Problem: DBI connection failure  7/20/2006; 2:38:02 PM (reads: 401, responses: 7) I'm installing WeBWork2 on a Red Hat Enterprise 4 machine. (Last summer I did this on a Mandrake machine, ugh, but it died this spring.) My dept had already bought the machine before Mark Hamrick's note (7/20/2006) recommending against RHE4. Mark's note was very helpful. Note: I had to add USE_DSO=1 to make mod_perl load modules in the httpd.conf file. It does not load mod_info so "server-info" does not work, as mentioned in the Installation Manual V2.2. It is loading mod_perl, so I've been assuming mod_perl is working. I have worked my way through to where the webwork courses page can be brought up in a browser (http://docralph.albertson.edu/webwork2), but when I click on the modelCourse link I get the following error: Error messages error instantiating DB driver WeBWorK::DB::Driver::SQL for table problem_user: DBI connect('webwork','webworkRead',...) failed: Access denied for user 'webworkRead'@'localhost' (using password: YES) at /opt/webwork2/lib/WeBWorK/DB/Driver/SQL.pm line 62 at /opt/webwork2/lib/WeBWorK.pm line 212 About the only thing I have not replaced on my machine is the mysql server which is version 4.1.20 (replaced Perl, mod_perl, Apache). I used CPAN to get all the Perl modules listed in the Installation Manual. I have checked to make sure the passwords on the mysql WeBWorK table and the ones I typed into the database.conf file match. Any suggestions? --rac <| Post or View Comments |>

 Michael Gage - Re: RHE4 Installation Problem: DBI connection failure  7/20/2006; 3:32:22 PM (reads: 429, responses: 0) Robin, I can tell you what is wrong, although not for sure how to fix it. The communication between webwork and your mysql database is still not yet correctly set up. Instructions for setting permissions are at: specifically: $mysql -u root -p mysqlPassword: **################## CREATE DATABASE webwork;> GRANT SELECT ON webwork.* TO webworkRead@localhost IDENTIFIED BY 'passwordRO';> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP ON webwork.* TO webworkWrite@localhost IDENTIFIED BY 'passwordRW';> exitBye$  You might try doing this again (Don't create the database again -- just reissue the GRANT commands. ). The passwordRO should be the same as the one in database.conf and the same for passwordRW. I believe what you can read in the mysql webwork table will only be the encoded version of these passwords, so that might be the problem. Also check to make sure that the admin course tables have been created in the database webwork: e.g. webwork.admin_user webwork.admin_set webwork.admin_key and similar tables should exist. One other trick you can try is to issue the GRANT command above omitting the entire IDENTIFIED by clause at the end. Then set your passwords in database.conf to be empty strings "". That might get you connected so that you can check that everything else is ok. I can tell that you are using a slightly older version of webwork2 since now we only need to set the password once in global.conf instead of database.conf. however I don't think that makes a difference: cvs update -r rel-2-2-1 -d gets the latest stable release if you are hooked up to the cvs. Take care, Mike <| Post or View Comments |>

 Michael Gage - Re: RHE4 Installation Problem: DBI connection failure  7/20/2006; 7:32:35 PM (reads: 430, responses: 0) One other idea. mysql keeps an error log somewhere perhaps /var/db or /var/db/mysql ? You may have actually specified the location while configuring mysql. In any case look in that error log and see if the messages give additional insight as to why the connection is not being made. <| Post or View Comments |>

 Michael Gage - Re: RHE4 Installation Problem: DBI connection failure  7/24/2006; 6:24:59 PM (reads: 410, responses: 0) another way to check connections. From the command line: > mysql -u webworkWrite -p>Password: webworkWritePassword hopefully this connects you. Then  >>show databases;>>use webwork;>>show tables;>>quit; should give you some idea of what is in the webwork.* database. Hope this helps. Take care, Mike <| Post or View Comments |>