>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 1/15/01, 8:41:36 PM, Miles Scruggs <[EMAIL PROTECTED]> wrote 
regarding RE: [midgard-user] Password:

> Ok well what would be the best practice to restore a old midgard database 
in
> various stages of upgrade (I have tried at various points to upgrade the
> midgard database so I can't say that it is from version x )?  The only 
data
> that I for one host.  Should I just start with a fresh midgard database 
and
> some how bring in the old data, or can I start with the old database and
> upgrade it?  I did try to upgrade it using the upgrade script at install
> time, but it barffed a number of errors about the sitegroup tables being
> there already, since I had tried to previously upgrade it.  As of right 
now
> I cannot tell if the midgard database is working or not because as 
specified
> in my previous email I cannot login as administrator because I do not
> remember the old admin password and during upgrad it did not reset to
> "password".  I would first like to fix this password problem and check to
> see how much of the database made it through the upgrade process, then 
move
> from there.

Okay, clear. 

        mysql> update person set password='**password' where id=1;

would reset the password for person with id equal to 1 to 'password'. 
This would normally be the admin user.

I suggest you make this change to the original database _before_ 
upgrading.

Then after, there have been changes to the repligard table structure in 
the beta stages that are not properly handled by the upgrade script. 
Here's what I did, in morse-code:

mysqldump -u midgard -p --no-create-info midgard > mgd.sql
mysqladmin -u root -p create midgard14
(assign same rights for midgard user to midgard14 as you have for the old 
database midgard)
mysql -u root -p midgard14 < empty.sql
edit mgd.sql:
delete all insert into repligard statements
add realm column to table sitegroup if needed (see empty.sql for table 
structure of sitegroup)
mysql -u root -p midgard14 < mgd.sql
create file install-repligard.conf :

<?xml version="1.0" encoding="ISO-8859-1" ?>
<Repligard xmlns="http://www.midgard-project.org/repligard/1.4">
        <!-- Database description -->
        <!-- Path to optionally compressed Repligard schema file -->
        <database
                schema="/usr/share/midgard-lib/repligard.xml"
                name="midgard14"
                username="midgard"
                password="midgard"
                encoding="ISO-8859-1"
                blobdir="/home/httpd/blobs"
        />
        <!-- Login account description for Repligard operation -->
        <login
                username="admin"
                password="password"
        />
</Repligard>

(Edit the above example to reflex your situation. Do not forget about the 
location of your blob directory.)
mysql -u root -p midgard14 < GUIDSforOLDSITE.sql
repligard -c install-repligard.conf -m
repligard -c install-repligard.conf -i AsgardSite.xml
(if you want french language localization for Asgard:)
repligard -c install-repligard.conf -i asgard.fr_FR.xml
(repeat this for other languages aside from default english you want to 
install).

This should do the trick.

Armand.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to