[LON-CAPA-dev] Re: SuSE installation

Matthew Brian Hall lon-capa-dev@mail.lon-capa.org
Wed, 08 Sep 2004 17:02:23 -0400


Martin Siegert writes: 

> Hmmm.
> # tar tzf loncapa-fedora-1.2.0.tar.gz | grep install.pl
> loncapa-1.2.0/doc/install/redhat7.3/install.pl 
> 
> Did I get the wrong tarball?

No, the file just isn't included in the tarball.  [sigh]   It's in CVS. 

> Yes, I can get in. 
> 
>> mysql> USE loncapa; 
> 
> This does not work:
> ERROR 1044: Access denied for user: 'www@localhost' to database 'loncapa' 
> 
> What did I mess up this time?

It does not appear that permissions have been set properly for user www.
It ought to be easy enough to fix.  We have to modify the 'db' table which 
controls user permissions on a database level. 

Get into MySQL as root: 

mysql -u root -p 

USE mysql;
INSERT INTO db VALUES 
('localhost','loncapa','www','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
DELETE FROM user WHERE host<>'localhost';
FLUSH PRIVILEGES; 

And that should hopefully do it.  If the INSERT fails, look at the 'db' 
table (below is output from 3.23): 

mysql> DESCRIBE db;
+-----------------+-----------------+------+-----+---------+-------+
| Field           | Type            | Null | Key | Default | Extra |
+-----------------+-----------------+------+-----+---------+-------+
| Host            | char(60) binary |      | PRI |         |       |
| Db              | char(64) binary |      | PRI |         |       |
| User            | char(16) binary |      | PRI |         |       |
| Select_priv     | enum('N','Y')   |      |     | N       |       |
| Insert_priv     | enum('N','Y')   |      |     | N       |       |
| Update_priv     | enum('N','Y')   |      |     | N       |       |
| Delete_priv     | enum('N','Y')   |      |     | N       |       |
| Create_priv     | enum('N','Y')   |      |     | N       |       |
| Drop_priv       | enum('N','Y')   |      |     | N       |       |
| Grant_priv      | enum('N','Y')   |      |     | N       |       |
| References_priv | enum('N','Y')   |      |     | N       |       |
| Index_priv      | enum('N','Y')   |      |     | N       |       |
| Alter_priv      | enum('N','Y')   |      |     | N       |       |
+-----------------+-----------------+------+-----+---------+-------+
13 rows in set (0.00 sec) 

Here's the output of the 'user' table in case it's needed: 

mysql> SELECT * FROM user;
+-----------+------+------------------+-------------+-------------+--------- 
 ----+-------------+-------------+-----------+-------------+---------------+- 
 -------------+-----------+------------+-----------------+------------+------ 
 ------+
| Host      | User | Password         | Select_priv | Insert_priv | 
Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | 
Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | 
Index_priv | Alter_priv |
+-----------+------+------------------+-------------+-------------+--------- 
 ----+-------------+-------------+-----------+-------------+---------------+- 
 -------------+-----------+------------+-----------------+------------+------ 
 ------+
| localhost | root | [omitted by mbh] | Y           | Y           | Y        
| Y           | Y           | Y         | Y           | Y             | Y    
| Y         | Y          | Y               | Y          | Y          |
| localhost |      |                  | N           | N           | N        
| N           | N           | N         | N           | N             | N    
| N         | N          | N               | N          | N          |
| localhost | www  | [omitted by mbh] | N           | N           | N        
| N           | N           | N         | N           | N             | N    
| Y         | N          | N               | N          | N          |
+-----------+------+------------------+-------------+-------------+--------- 
 ----+-------------+-------------+-----------+-------------+---------------+- 
 -------------+-----------+------------+-----------------+------------+------ 
 ------+ 

I have a test/diagnostic script just about ready to check in but it doesn't 
address this issue yet. 

Matthew 

 ---------------------------------------
Matthew Hall           hallmat3@msu.edu
LON-CAPA developer
Michigan State University
 ---------------------------------------