[Thread Prev][Thread Next][Index]

Re: Mirrored server



Hi Roland,

You've already done this! Here's some e-mail you sent us a few months ago:
 


  LAS Meisters, 

  I found it convenient to be able to specify the host of the mySQL server while 
  installing LAS 5.  To facilitate this I made some changes to 
  xml/perl/genLas2.pl.in and xml/perl/LASDB.pm. 

  Below are the diffs... 

  Roland 

  ++++++ genLas2.pl.in 
  676,677c676,677 
  <     my ($files, $user, $passwd) = @_; 
  <     my $ser = new LASDB::Serializer('LASDB::MySQL', $user, $passwd); 
  --- 
  >     my ($files, $user, $passwd, $host) = @_; 
  >     my $ser = new LASDB::Serializer('LASDB::MySQL', $user, $passwd, $host); 
  683c683 
  <     printerrln "Usage: genLas2.pl [-u dblogin [-p dbpasswd]] [-d JavaScript di 
  rectory] xmlfile [xmlfile]"; 
  --- 
  >     printerrln "Usage: genLas2.pl [-h dbhost -u dblogin [-p dbpasswd]] [-d Jav 
  aScript directory] xmlfile [xmlfile]"; 
  689c689 
  < my ($DBuser, $DBpasswd); 
  --- 
  > my ($DBuser, $DBpasswd, $DBhost); 
  691c691 
  < getopts('d:u:p:', \%opts); 
  --- 
  > getopts('d:u:p:h:', \%opts); 
  705a706,709 
  > if ($opts{h}){ 
  >     $DBhost = $opts{h}; 
  > } 
  > 
  718a723,725 
  >     if (! defined $DBhost){ 
  >       $DBhost = getAnswer('DB host', ''); 
  >     } 
  720c727 
  <       $dbtest = new LASDB::MySQL($DBuser, $DBpasswd); 
  --- 
  >       $dbtest = new LASDB::MySQL($DBuser, $DBpasswd, $DBhost); 
  726a734 
  >         undef $DBhost; 
  754c762 
  < genDB(\@files, $DBuser, $DBpasswd); 
  --- 
  > genDB(\@files, $DBuser, $DBpasswd, $DBhost); 

  +++++++ LASDB.pm 

  61c61 
  <     my ($class, $login, $password) = @_; 
  --- 
  >     my ($class, $login, $password, $host) = @_; 
  64a65 
  >     my $db = 'DBI:mysql:las:'.$host; 
  66c67 
  <       DBI->connect('DBI:mysql:las', $login, $password, 
  --- 
  >       DBI->connect($db, $login, $password, 
  242c243 
  <     die "Database doesn't appear to contain $url" if ($#rvals < 0); 
  --- 
  >     die "url = $url -- hash = $hash -- Database doesn't appear to contain $url 
  " if ($#rvals < 0); 
  419c420 
  <     my ($class, $dbClass, $url, $login, $password) = @_; 
  --- 
  >     my ($class, $dbClass, $url, $login, $password, $host) = @_; 
  425c426 
  <     $self->initialize($url, $login, $password); 
  --- 
  >     $self->initialize($url, $login, $password, $host); 
  430,431c431,432 
  <     my ($self, $url, $login, $password) = @_; 
  <     $self->{db} = new LASDB::MySQL($login, $password); 
  --- 
  >     my ($self, $url, $login, $password, $host) = @_; 
  >     $self->{db} = new LASDB::MySQL($login, $password, $host); 
  619c620 
  <     my ($class, $dbClass, $login, $password) = @_; 
  --- 
  >     my ($class, $dbClass, $login, $password, $host) = @_; 
  627c628 
  <     $self->initialize($login, $password); 
  --- 
  >     $self->initialize($login, $password, $host); 
  632,633c633,634 
  <     my ($self, $login, $password) = @_; 
  <     $self->{db} = new LASDB::MySQL($login, $password); 
  --- 
  >     my ($self, $login, $password, $host) = @_; 
  >     $self->{db} = new LASDB::MySQL($login, $password, $host);

Roland Schweitzer wrote:

Hi Joe,

Joe Sirott wrote:
>
> Hi Roland,
>
> I'm assuming you're running on Solaris. If you type perror 151 on a Solaris
> machine, you get:
>
> Stale NFS file handle
>
> So, it looks like there's some problem with locking files over NFS.
>
> Are you running MySQL servers on the two different machines that share MySQL
> database files via NFS? If so, you might try the alternative of running MySQL
> on one machine and configuring LAS to use MySQL remotely.

Thanks.  I think running on one MySQL server is a fine idea.  Is the procedure
for configuring LAS to use a remote MySQL server documented?

Roland

--
Joe Sirott
 
[Thread Prev][Thread Next][Index]

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