[Thread Prev][Thread Next][Index]

Re: sharing a database between las5 and las6



John,

You understand correctly.  The only database that they share is the 'las'
database.  The configuration script is careful not to do anything with
numbered databases that are associated with another LAS in another
directory.  You may proceed with your las6 install without any worries and
without taking any particular precautions.


-- Jon


John C Cartwright wrote:

> Thanks, Jon!
>
> Just to make sure that I'm clear on this: I have las5 running and it is
> using several mysql databases (las, las0, las1, las2, las3).  You're
> saying that if I run the configure script in the las6 install directory
> that it will cooperatively use the existing las database without any
> impact on the existing las5 configuration and create new databases
> las4,las5 for the las6 configuration?
>
> Thanks again for your prompt and thorough help.
>
> -- john
>
> ----- Original Message -----
> From: Jonathan Callahan <Jonathan.S.Callahan@noaa.gov>
> Date: Monday, March 3, 2003 12:52 pm
> Subject: Re: sharing a database between las5 and las6
>
> > John,
> >
> > I cc'ed the las_users group as it seems like a worthwhile topic.
> >
> > I have a machine that is running half a dozen LAS 5's and half a
> > dozen LAS
> > 6's without any problems at all.  Each LAS has a separate installation
> > directory and I run configure in each.  I use the same Apache
> > server and
> > same MySQL server for all of the LAS's.  For the v6 servers I force
> > them to
> > share a single Tomcat server.
> >
> > Each time you run the configure script for a new LAS installation,
> > a MySQL
> > database named 'las' has it's 'map' table updated to associate a .xml
> > configuration file with another database named 'las#'.  If the .xml
> > configuration file is new then a the # is incremented.  Each 'las#'
> > databaseassociated with the 'las.xml' configuration file has tables
> > that contain the
> > information about datasets, variables, properties, etc. associated
> > with that
> > LAS installation.
> >
> > So there should be no problems at all with running multiple LAS
> > installations with a single MySQL installation.  Just install LAS
> > in a new
> > directory and give it a new name like "las2" in the configuration
> > process.And don't forget to update the Apache httpd.conf file.
> >
> >
> > -- Jon
> >
> > For the interested I'll include a short tour of the LAS MySQL
> > tables that
> > will explain what is going on.
> >
> > Using the appropriate localhost/full_host as appropriate, you
> > should be able
> > to do the following:
> >
> > > mysql -u root -h localhost -p
> > Welcome to the MySQL monitor.  Commands end with ; or \g.
> > Your MySQL connection id is 12162 to server version: 3.23.45
> >
> > Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
> >
> > mysql> show databases;
> > +----------+
> > | Database |
> > +----------+
> > | bugs     |
> > | bugs2    |
> > | las      |
> > | las0     |
> > | las1     |
> > | las10    |
> > | las11    |
> > | las12    |
> > | las13    |
> > | las14    |
> > ...
> > 44 rows in set (0.00 sec)
> >
> > ### We've got a bunch of LAS installations on this computer.
> > ### Some of them are defunct but I've not bothered to clean up
> > ### their old entries in this table.  The database named 'las'
> > ### is the place to begin.
> >
> > mysql> use las;
> > Reading table information for completion of table and column names
> > You can turn off this feature to get a quicker startup with -A
> >
> > Database changed
> > mysql> show tables;
> > +---------------+
> > | Tables_in_las |
> > +---------------+
> > | map           |
> > | sessions      |
> > +---------------+
> > 2 rows in set (0.00 sec)
> >
> > mysql> describe map;
> > +-------+--------------+------+-----+---------+-------+
> > | Field | Type         | Null | Key | Default | Extra |
> > +-------+--------------+------+-----+---------+-------+
> > | urlid | varchar(128) |      | PRI |         |       |
> > | path  | varchar(255) |      |     |         |       |
> > | dbase | varchar(32)  | YES  |     | NULL    |       |
> > +-------+--------------+------+-----+---------+-------+
> > 3 rows in set (0.00 sec)
> >
> > mysql> select * from map;
> > +------------------------+------------------------------------------
> > ----------------------------------------------------------------+---
> > ----+
> >
> > | urlid                  |
> > path
> > | dbase |
> > +------------------------+------------------------------------------
> > ----------------------------------------------------------------+---
> > ----+
> >
> > | ayIcAjUHdfbulHjY5FNSCQ |
> > file:/home/stout/sirott/lasxml/server/las.xml
> > | las0  |
> > | IBFCTw/aa3d4ZmmMB/2GbA |
> > file:/home/stout/sirott/lasxml/server/ui.xml
> > | las1  |
> > | fWQvk+dv4sphTpZKeQLdVw |
> > file:/home/stout/sirott/lasxml/server/options.xml
> > | las2  |
> > | UfY6W6eqs7k44y1T20SMyA |
> > file:/home/stout/sirott/las_servlet/perl/las.xml
> > | las3  |
> > | 9lKYAKY7HPUiiyqvuqg/oQ |
> > file:/home/stout/sirott/las/server/las.xml
> > | las4  |
> > | LbWq/VttBQLywRQGE2UdWA |
> > file:/home/stout/sirott/las/server/ui.xml
> > | las5  |
> > ...
> > 38 rows in set (0.01 sec)
> >
> > ### As you see in the above commands, the 'las' database
> > ### associates a unique path with another mysql database where all
> > ### of the information for that LAS installation reside.
> > ### Let's look at the one whose configuration file is:
> > ###   /home/stout/sirott/las/server/las.xml
> >
> > mysql> use las0;
> > Reading table information for completion of table and column names
> > You can turn off this feature to get a quicker startup with -A
> >
> > Database changed
> > mysql> show tables;
> > +----------------+
> > | Tables_in_las0 |
> > +----------------+
> > | attributes     |
> > | children       |
> > | elements       |
> > +----------------+
> > 3 rows in set (0.01 sec)
> >
> > ### The 'elements' table is the place to begin but I'll give
> > ### you a shortcut by saying just select rows that describe
> > ### the variables associated with a dataset;
> >
> > mysql> describe elements;
> > +-------+--------------+------+-----+---------+-------+
> > | Field | Type         | Null | Key | Default | Extra |
> > +-------+--------------+------+-----+---------+-------+
> > | oid   | int(11)      |      | PRI | 0       |       |
> > | name  | varchar(128) |      | MUL |         |       |
> > | path  | varchar(255) |      | MUL |         |       |
> > +-------+--------------+------+-----+---------+-------+
> > 3 rows in set (0.00 sec)
> >
> > mysql> select * from elements where name = "variables";
> > +-----+-----------+-------------------------------------------------
> > ----+
> > | oid | name      | path
> >    |
> > +-----+-----------+-------------------------------------------------
> > ----+
> > | 153 | variables |
> > /lasdata/datasets/coads_climatology_cdf/variables   |
> > | 221 | variables |
> > /lasdata/datasets/levitus_climatology_cdf/variables |
> > +-----+-----------+-------------------------------------------------
> > ----+
> > 2 rows in set (0.04 sec)
> >
> > ### Armed with the object ID (oid) we can query the 'children' table
> > ### to see what variables are in the coads_climatology_cdf dataset.
> >
> > mysql> describe children;
> > +-----------+--------------+------+-----+---------+-------+
> > | Field     | Type         | Null | Key | Default | Extra |
> > +-----------+--------------+------+-----+---------+-------+
> > | oid       | int(11)      |      |     | 0       |       |
> > | parentid  | int(11)      |      | MUL | 0       |       |
> > | childid   | int(11)      |      | MUL | 0       |       |
> > | childname | varchar(128) |      |     |         |       |
> > +-----------+--------------+------+-----+---------+-------+
> > 4 rows in set (0.00 sec)
> >
> > mysql> select * from children where parentid = "153";
> > +-----+----------+---------+-----------+
> > | oid | parentid | childid | childname |
> > +-----+----------+---------+-----------+
> > | 156 |      153 |     155 | airt      |
> > | 163 |      153 |     162 | speh      |
> > | 170 |      153 |     169 | sst       |
> > | 177 |      153 |     176 | uwnd      |
> > | 184 |      153 |     183 | wspd      |
> > | 191 |      153 |     190 | vwnd      |
> > | 198 |      153 |     197 | slp       |
> > +-----+----------+---------+-----------+
> > 7 rows in set (0.02 sec)
> >
> >
> >
> >
> >
> >
> > John C Cartwright wrote:
> >
> > > Thanks for the prompt reply, Jon.
> > >
> > > My problem is that during the transition period between versions
> > 5 and
> > > 6, I'd like to run both las5 and las6 on the same server.
> > >
> > > It was not clear to me where (other than mysql hostname) I could
> > direct> the las6 configure script to use a different set of
> > databases.  If I had
> > > to, I could run a separate instance of mysql on a different port,
> > but> couldn't even see where I'd specify it if I did.
> > >
> > > Do you have any suggestions of how best to deal with this situation?
> > >
> > > Thanks!
> > >
> > > -- john
> > >
> > > ----- Original Message -----
> > > From: "Jonathan S Callahan" <Jonathan.S.Callahan@noaa.gov>
> > > Date: Monday, March 3, 2003 11:31 am
> > > Subject: Re: sharing a database between las5 and las6
> > >
> > > > John,
> > > >
> > > > It's definitely not advisable to do this.  You'd probably have to
> > > > hack to
> > > > code to make it work and I see no reason why you'd want to do
> > this.> > Can
> > > > you describe the problem you're trying to solve with this so that
> > > > we might
> > > > suggest another solution?
> > > >
> > > >
> > > > -- Jon
> > > >
> > > >
> > > > John C Cartwright wrote:
> > > >
> > > > > Hello All,
> > > > >
> > > > > I was wondering if it were possible or advisable, to share a
> > > > single set
> > > > > of mysql databases (las, las0, las1, etc.) between a instance of
> > > > las5> and las6 running on the same server.
> > > > >
> > > > > Thanks!
> > > > >
> > > > > -- john
> > > >
> > > >
> >



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement