]> git.pld-linux.org Git - packages/mysql.git/blobdiff - mysql.init
- put mysql-doc to proper place (-libs)
[packages/mysql.git] / mysql.init
index c7e3dc73a3665d7e26db5420d7987a9337376814..d4250d700ddbf9a1ae1de86c2ebf6b3167db5670 100644 (file)
@@ -275,6 +275,9 @@ mysqlinit() {
                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"
@@ -642,8 +645,6 @@ This is done (after starting database) with:
 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
@@ -666,7 +667,7 @@ logging in /etc/mysqld.conf gives you a log in /var/log/mysql/log that
 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
@@ -736,7 +737,10 @@ case "$action" in
   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
        ;;
   *)
This page took 0.03123 seconds and 4 git commands to generate.