[LON-CAPA-admin] upgrading from RH 6.2 to 7.3 (continuation)

Guy Albertelli II guy at albertelli.com
Thu Aug 22 14:39:50 EDT 2002


Hi Martin,

mysql is now running on dalton, I corrected the datadir line, it was
the only thing left that was incorrect.

Just for the record, and for future people who want to do an upgrade:
My suggestions for dealing with mysql would have been 
1) remove the old LON-CAPA-mysql rpm
2) reinstall all of the 7.3 mysql rpms to cause them to overwrite any
conflicts taht might have existed
3) init the data base according to what install.pl would have done.


Only thing left is to init the database and that is this chuck of perl
in install.pl:

-------
##
## Get root password for mysql client
##
print <<END;
Please enter a root password for the mysql database.
It does not have to match your root account password, but you will
need
to remember it.
END
my $rootpass = <>;
chomp $rootpass;
print_and_log("\n");

##
## Run the damn thing (mysql, not LON-CAPA)
##
print_and_log("Starting mysql client.\n");
open MYSQL, "|mysql -u root mysql" || die "Unable to start mysql\n";
print MYSQL <<"ENDMYSQL";
CREATE DATABASE loncapa;
INSERT INTO user (Host, User, Password)
VALUES ('localhost','www',password('localhostkey'));
GRANT ALL PRIVILEGES ON *.* TO www\@localhost;
SET PASSWORD FOR root\@localhost=PASSWORD('$rootpass');
DELETE FROM user WHERE host<>'localhost';
FLUSH PRIVILEGES;
USE loncapa;
CREATE TABLE IF NOT EXISTS metadata (title TEXT, author TEXT, subject TEXT, url TEXT, keywords TEXT, version TEXT, notes TEXT, abstract TEXT, mime TEXT, language TEXT, creationdate DATETIME, lastrevisiondate DATETIME, owner TEXT, copyright TEXT, FULLTEXT idx_title (title), FULLTEXT idx_author (author), FULLTEXT idx_subject (subject), FULLTEXT idx_url (url), FULLTEXT idx_keywords (keywords), FULLTEXT idx_version (version), FULLTEXT idx_notes (notes), FULLTEXT idx_abstract (abstract), FULLTEXT idx_mime (mime), FULLTEXT idx_language (language), FULLTEXT idx_owner (owner), FULLTEXT idx_copyright (copyright)) TYPE=MYISAM;
EXIT
ENDMYSQL

close MYSQL;
print_and_log("\n");
-------

> # rpm -qa | grep -i capa
> LON-CAPA-mysql-3.1-1
> LON-CAPA-barcode-3.1-1
> LON-CAPA-base-3.1-1
> LON-CAPA-loncapaconfig-3.1-1
> LON-CAPA-systemperl-3.4-1
> LON-CAPA-krb4-3.1-1
> 
> ... there is LON-CAPA-mysql, which is probably completely incompatible with
> RedHat's mysql, right? Which of these LON-CAPA RPMS should I have anyway?

At the 7.3 stage, systemperl and barcode are all that are needed.

> P.S.: ... still hoping that I can go on vacation next week ...
>       wishful thinking?

Very nearly done, I would do the database init for you but I I want to
let you select the root password on the database.

-- 
guy at albertelli.com          BM: n^20 t20 z20 qS 
Guy Albertelli -7-8-4-  O-
    I would love to but . . . it wouldn't be fair to the other Beautiful
    People. 



More information about the LON-CAPA-admin mailing list