Skip to content

Commit f433af6

Browse files
ltangvaldprashanttekriwal
authored andcommitted
Bug#25643023 SERVER ABORTING WHILE INITIALIZING DATABASE WITH INIT SCRIPTS
If the datadir is deleted and the service restarted, the service script will reinitialize the database, then try to set auth_socket plugin for the now passwordless root account. The latter should not happen, because a) It's a major change in an old GA, and b) The sql simply fails, since it's run in bootstrap mode. (cherry picked from commit c93e3dfcca4a59c4228c5bce1eaac7b83f2c31db)
1 parent 88774b7 commit f433af6

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

packaging/deb-in/extra/mysql-helpers

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,6 @@ verify_database() {
142142

143143
if [ ! -d "${MYSQLDATA}/mysql" ] && [ -d "${MYSQLFILES}" ]; then
144144
su - mysql -s /bin/bash -c "mysql_install_db --user=mysql > /dev/null"
145-
SQL=$(mktemp -u ${MYSQLFILES}/XXXXXXXXXX)
146-
install /dev/null -m0600 -omysql -gmysql "${SQL}"
147-
cat << EOF > ${SQL}
148-
USE mysql;
149-
INSTALL PLUGIN auth_socket SONAME 'auth_socket.so';
150-
UPDATE user SET plugin='auth_socket' WHERE user='root';
151-
FLUSH PRIVILEGES;
152-
EOF
153-
run_init_sql "$SQL"
154-
rm -f "$SQL"
155145
fi
156146

157147
if [ -x /usr/bin/mysql_ssl_rsa_setup -a ! -e "${MYSQLDATA}/server-key.pem" ]; then

0 commit comments

Comments
 (0)