Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #78 from yoku0825/fix_mysql57_installation
Browse files Browse the repository at this point in the history
Fix mysql57-community-mroonga's installation issue.

Patch by GMO Media, Inc. Thanks!!!
  • Loading branch information
kou committed Oct 29, 2015
2 parents a86a123 + ccf6959 commit ee5e2b6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/rpm/centos/mysql57-community-mroonga.spec.in
Expand Up @@ -24,7 +24,7 @@

Name: mysql57-community-mroonga
Version: @VERSION@
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A fast fulltext searchable storage engine for MySQL

Group: Applications/Databases
Expand Down Expand Up @@ -107,6 +107,7 @@ rm -rf $RPM_BUILD_ROOT
if ! /sbin/service mysqld status > /dev/null; then
/sbin/service mysqld start
stop_after_installation=1
export MYSQL_PWD=`awk '/root@localhost/{print $NF}' /var/log/mysqld.log`
else
stop_after_installation=0
fi
Expand Down Expand Up @@ -143,13 +144,21 @@ if [ "$1" = 2 ] ; then
echo " $command")
fi
fi

if [ -n "$password_option" -a "$stop_after_installation" = "1" ]; then
$mysql_command -u root --connect-expired-password -e "ALTER USER user() IDENTIFIED BY '$MYSQL_PWD'"
password_option=""
fi

command="$mysql_command -u root $password_option < ${install_sql}"
echo $command
eval $command || \
(echo "run the following command to register Mroonga:"; \
echo " $command")

if [ "$stop_after_installation" = "1" ]; then
$mysql_command -u root -e "ALTER USER root@localhost PASSWORD EXPIRE"
unset MYSQL_PWD
/sbin/service mysqld stop
fi

Expand Down

0 comments on commit ee5e2b6

Please sign in to comment.