From de504ddf8469acc3c3a6b3c2e3a2acc7b7df70f2 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 09:06:04 +0000 Subject: [PATCH] auto-import changelog data from mysql-3.23.58-5.src.rpm Tue Nov 18 2003 Kim Ho 3.23.58-5 - update mysql.init to use anonymous user (UNKNOWN_MYSQL_USER) for pinging mysql server (#108779) --- mysql.init | 9 ++++++--- mysql.spec | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/mysql.init b/mysql.init index 418ec23..7d306a5 100644 --- a/mysql.init +++ b/mysql.init @@ -29,23 +29,26 @@ start(){ ret=$? chown -R mysql.mysql $datadir if [ $ret -ne 0 ] ; then - return $ret + return $ret; fi fi chown -R mysql.mysql $datadir chmod 0755 $datadir /usr/bin/safe_mysqld --defaults-file=/etc/my.cnf >/dev/null 2>&1 & ret=$? + # 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" # Spin for a maximum of ten seconds waiting for the server to come up if [ $ret -eq 0 ]; then for x in 1 2 3 4 5 6 7 8 9 10; do - if [ -n "`/usr/bin/mysqladmin ping 2> /dev/null`" ]; then + if [ -n "`$ping 2> /dev/null`" ]; then break; else sleep 1; fi done - if !([ -n "`/usr/bin/mysqladmin ping 2> /dev/null`" ]); then + if !([ -n "`$ping 2> /dev/null`" ]); then echo "Timeout error occurred trying to start MySQL Daemon." action $"Starting $prog: " /bin/false else diff --git a/mysql.spec b/mysql.spec index 26e8e4f..850b605 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,6 +1,6 @@ Name: mysql Version: 3.23.58 -Release: 4 +Release: 5 Source0: http://www.mysql.com/Downloads/MySQL-3.23/mysql-%{version}.tar.gz Source1: mysql.init Source2: mysql.logrotate @@ -276,6 +276,10 @@ fi %{_datadir}/sql-bench %changelog +* Tue Nov 18 2003 Kim Ho 3.23.58-5 +- update mysql.init to use anonymous user (UNKNOWN_MYSQL_USER) for + pinging mysql server (#108779) + * Mon Oct 27 2003 Kim Ho 3.23.58-4 - update mysql.init to wait (max 10 seconds) for mysql server to start (#58372)