[LON-CAPA-dev] Re: SuSE installation

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


Hi Martin, 

> I am still struggling with the mysql setup:
> "/etc/init.d/loncontrol start" only results in "cannot connect to database"
> (and, yes, mysqld is running).

Good to hear :) 

> - it seems to me that the install.pl script is only for RH 7.3
>   (loncapa-1.2.0/doc/install/redhat7.3/install.pl). In fact the
>   corresponding loncapa-1.2.0/doc/install/fedora directory is
>   empty. How is mysql setup for a fedora2 installation?

Hmmm.  It's there on my machine: 

[matthew@kirk fedora]$ pwd
/home/matthew/loncapa/doc/install/fedora
[matthew@kirk fedora]$ ls -l
total 32
drwxrwxr-x  2 matthew matthew  4096 Mar 17 13:48 CVS
 -rwxrwxr-x  1 matthew matthew 12671 Dec 19  2003 install.pl
 -rw-rw-r--  1 matthew matthew  9718 Mar 17 13:49 
LON-CAPA_fedora_install.html 

Nevertheless, the commands are the same so it shouldn't make a difference 
which install.pl script you use. 

> - I tried to execute the commands from install.pl manually: 
> 
> # mysql -u root mysql
> mysql> CREATE DATABASE loncapa;
> Query OK, 1 row affected (0.00 sec) 
> 
> mysql> INSERT INTO user (Host, User, Password) VALUES ('localhost','www',password('localhostkey'));
> ERROR 1062: Duplicate entry 'localhost-www' for key 1
> mysql> 

So it looks like the entry we want has already been made.  Try to log in by 
hand: 

# mysql -u www -p
Enter password: localhostkey 

If you can get in and execute 

mysql> USE loncapa; 

then it should be set up well enough.  Running the searchcat.pl script 
should take care of setting up the necessary metadata table, assuming it can 
connect to the database. 

As to why you cannot connect....  I'm not sure.  I'll hack together a 
stripped down test script and we'll have to start from there. 

>   This is mysql-4.0.18. I do not know whether the mysql syntax has changed
>   from RH7.3's mysql-3.23.58 so much that those commands in install.pl
>   do not work anymore.

I honestly doubt that's the problem here. 

Matthew 

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