[Pkg-mysql-commits] r2245 - mysql-5.6/trunk/debian

Bjoern Boschman jesusch-guest at alioth.debian.org
Sat Nov 2 10:00:06 UTC 2013


Author: jesusch-guest
Date: 2013-11-02 10:00:05 +0000 (Sat, 02 Nov 2013)
New Revision: 2245

Modified:
   mysql-5.6/trunk/debian/mysql-server-5.6.postinst
Log:
added first changes from Akhil


Modified: mysql-5.6/trunk/debian/mysql-server-5.6.postinst
===================================================================
--- mysql-5.6/trunk/debian/mysql-server-5.6.postinst	2013-09-30 18:26:17 UTC (rev 2244)
+++ mysql-5.6/trunk/debian/mysql-server-5.6.postinst	2013-11-02 10:00:05 UTC (rev 2245)
@@ -146,6 +146,9 @@
     if [ "$?" != "0" ]; then
       echo "ATTENTION: An error has occured. More info is in the syslog!"
     fi
+    #added to make sure database directories and files are owned by user mysql
+    chown -R mysql $mysql_statedir
+    chmod 700 $mysql_statedir $mysql_statedir/mysql
     set -e
     
     ## On every reconfiguration the maintenance user is recreated.
@@ -192,10 +195,10 @@
 
     # update privilege tables
     password_column_fix_query=`echo -e \
-        "USE mysql\n" \
+        "USE mysql;\n" \
         "ALTER TABLE user CHANGE Password Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL"`;
     replace_query=`echo -e \
-        "USE mysql\n" \
+        "USE mysql;\n" \
         "REPLACE INTO user SET " \
         "  host='localhost', user='debian-sys-maint', password=password('$pass'), " \
         "  Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \
@@ -205,7 +208,7 @@
         "  Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\
         "  Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\
         "  Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\
-        "  Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y' "`;
+        "  Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y'; "`;
     fix_privs=`echo -e \
         "USE mysql;\n" \
         "ALTER TABLE user ADD column Create_view_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
@@ -220,7 +223,7 @@
     # admin might already have chosen to remove one or more plugins. Newlines are necessary.
     install_plugins=`echo -e \
         "USE mysql;\n" \
-        "CREATE TABLE plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \
+        "CREATE TABLE IF NOT EXISTS plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \
         "  dl char(128) COLLATE utf8_bin NOT NULL DEFAULT '', " \
         "  PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins';\n" \
         "INSERT INTO plugin VALUES ('innodb',    'ha_innodb.so');\n" \
@@ -229,14 +232,14 @@
         "INSERT INTO plugin VALUES ('archive',   'ha_archive.so');" `
 
     # Upgrade password column format before the root password gets set.
-    echo "$password_column_fix_query"                        | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
+    #echo "$password_column_fix_query"                        | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
 
     db_get mysql-server/root_password && rootpw="$RET"
     if ! set_mysql_rootpw; then
         password_error="yes"
     fi
 
-    echo "$fix_privs"                                        | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
+    #echo "$fix_privs"                                        | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
     echo "$replace_query"                                    | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
     set +e
     echo "$install_plugins"                                  | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER




More information about the Pkg-mysql-commits mailing list