Re: MySQL startup confused [SOLVED]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2005-01-11 at 21:10, Alexander Dalloz wrote:
> That was Jason's quick guess. And having a look at the mysql init script
> you will find following comment:
> 
>         # If you've removed anonymous users, this line must be changed
> to
>         # use a user that is allowed to ping mysqld.
>         ping="/usr/bin/mysqladmin -uUNKNOWN_MYSQL_USER ping"

The update from January 5 does it in an even better way (see the
bugzilla mentioned earlier in th thread)

        # Spin for a maximum of N seconds waiting for the server to come
up.
        # Rather than assuming we know a valid username, accept an
"access
        # denied" response as meaning the server is functioning.
        if [ $ret -eq 0 ]; then
            STARTTIMEOUT=10
            while [ $STARTTIMEOUT -gt 0 ]; do
                RESPONSE=`/usr/bin/mysqladmin -uUNKNOWN_MYSQL_USER ping
2>&1` &&
 break
                echo "$RESPONSE" | grep -q "Access denied for user" &&
break
                sleep 1
                let STARTTIMEOUT=${STARTTIMEOUT}-1
            done
            if [ $STARTTIMEOUT -eq 0 ]; then
                    echo "Timeout error occurred trying to start MySQL
Daemon."
                    action $"Starting $prog: " /bin/false
            else
                    action $"Starting $prog: " /bin/true
            fi
        else
            action $"Starting $prog: " /bin/false
        fi

I.e. an "Access denied for user" is also considered as an indication
that the server is up.

Lars
-- 
Lars E. Pettersson <lars@xxxxxxxx>
http://www.sm6rpz.se/


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux