MYSQL_DATA_DIR="$clusterdir/mysqldb/db"
MYSQL_PIDFILE="$clusterdir/mysqldb/mysql.pid"
MYSQL_SOCKET="$clusterdir/mysqldb/mysql.sock"
+
+ # this $MYSQL_CONFIG will be created later
+ MYSQL_CONFIG="$MYSQL_CLUSTER_DIR/mysqld.conf"
fi
nls "Initializing cluster %s" "$clusterdir"
NOTE: mysql_logrotate password should be placed to $MYSQL_CONFIG in
mysqladmin section. See the manual for more instructions.
-IMPORTANT: The configuration file is mysqld.conf in MYSQL_DB_CLUSTERS directories.
-
END_OF_MSG
else
fail
may be helpful. The latest information about MySQL is available on the
web at http://www.mysql.com/.
-Please check PLD ftp site for newer versions of this package.
+Please check PLD Linux ftp site for newer versions of this package.
Please consult the MySQL manual section: 'Problems running
mysql_install_db', and the manual section that describes problems on
flush-logs)
for mysqldir in $DB_CLUSTERS; do
mysqlgetconfig "$mysqldir"
- /usr/bin/mysqladmin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" flush-logs
+ # just if mysqld is really running
+ if /usr/bin/mysqladmin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" ping >/dev/null 2>&1; then
+ /usr/bin/mysqladmin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" flush-logs
+ fi
done
;;
*)