Subject: [LON-CAPA-dev] Re: TEST error message

From: Scott Harrison <[email-masked]>
Date: Tue, 6 Aug 2002 14:23:41 -0400

> Hi Scott,
> 
> When the Mysql tests fail, it says the error is due to the password
> being wrong, could it also mention (or look and see) that the daemon
> is running?

Dear Guy:

sqltest.pl already checks the daemon.  See:
  loncapa/loncom/build/system_dependencies/sqltest.pl

// BEGINCODE
        my $checkprocess=`/etc/rc.d/init.d/mysqld status`;
        .
        .
        .
        elsif ($checkprocess=~/is stopped/) {
            print "**** ERROR **** IT APPEARS THAT THE MYSQL SERVER IS NOT ".
                "RUNNING\n";
            print(<<END);
To fix temporarily, run the command:
   /etc/rc.d/init.d/mysqld start

You may also want to check and see that mysqld is started on boot time.

   /sbin/chkconfig --list mysqld

This is bad output:
mysqld         0:off  1:off  2:off  3:off  4:off  5:off  6:off

This is good output:
mysqld         0:off  1:off  2:off  3:on   4:on   5:on   6:off

To configure mysqld to launch correctly upon system startup, type the command:
   /sbin/chkconfig --level 345 mysqld on
END
    }

// ENDCODE

I do remember, however, not being perfectly happy with the behavior of
sqltest.pl.

I think I need to change the strategy from 
  testing one possible problem then
          another possible problem
          then another possible problem

To a strategy where
  all possible problems are checked and a status report given.

What you are probably observing is that the mysqld status check
is not running because sqltest.pl thinks something else is wrong.

(Note that RedHat's /sbin/chkconfig is quite frequently broken
 for syntax like /sbin/chkconfig --add and
 /sbin/chkconfig --del; thus I recommend /sbin/chkconfig --levels ...).

Regards,
Scott

-- 
Scott Harrison, [email-masked]