commit:     705d182ed875589b0ad1c809ae6ba1cfadf55352
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  7 20:47:48 2016 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Feb  7 20:47:48 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=705d182e

mysql eclasses: Add missing SQL command after setting root password wrt bug 
574040

When updating the table by hand, we don't do FLUSH PRIVILEGES before inserting 
the
next command which can stop the loading of the timezone and help tables.

 eclass/mysql-multilib-r1.eclass | 2 +-
 eclass/mysql-multilib.eclass    | 2 +-
 eclass/mysql-v2.eclass          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/mysql-multilib-r1.eclass b/eclass/mysql-multilib-r1.eclass
index e14a2a8..1512b21 100644
--- a/eclass/mysql-multilib-r1.eclass
+++ b/eclass/mysql-multilib-r1.eclass
@@ -952,7 +952,7 @@ mysql-multilib-r1_pkg_config() {
 
        ebegin "Setting root password"
        # Do this from memory, as we don't want clear text passwords in temp 
files
-       local sql="UPDATE mysql.user SET Password = 
PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'"
+       local sql="UPDATE mysql.user SET Password = 
PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
        "${EROOT}/usr/bin/mysql" \
                --socket=${socket} \
                -hlocalhost \

diff --git a/eclass/mysql-multilib.eclass b/eclass/mysql-multilib.eclass
index 69293f1..b2e7dff 100644
--- a/eclass/mysql-multilib.eclass
+++ b/eclass/mysql-multilib.eclass
@@ -1140,7 +1140,7 @@ mysql-multilib_pkg_config() {
 
        ebegin "Setting root password"
        # Do this from memory, as we don't want clear text passwords in temp 
files
-       local sql="UPDATE mysql.user SET Password = 
PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'"
+       local sql="UPDATE mysql.user SET Password = 
PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
        "${EROOT}/usr/bin/mysql" \
                --socket=${socket} \
                -hlocalhost \

diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass
index 260420b..556d37e 100644
--- a/eclass/mysql-v2.eclass
+++ b/eclass/mysql-v2.eclass
@@ -886,7 +886,7 @@ mysql-v2_pkg_config() {
 
        ebegin "Setting root password"
        # Do this from memory, as we don't want clear text passwords in temp 
files
-       local sql="UPDATE mysql.user SET Password = 
PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'"
+       local sql="UPDATE mysql.user SET Password = 
PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
        "${EROOT}/usr/bin/mysql" \
                --socket=${socket} \
                -hlocalhost \

Reply via email to