[DRE-commits] [ruby-moneta] 01/02: do not pass --skip-grant-tables to mysqld.

Daisuke Higuchi dai at moszumanska.debian.org
Sat Dec 10 16:17:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

dai pushed a commit to branch master
in repository ruby-moneta.

commit 17a88b77bcc1c0e2bb4b04cf9cc93d076c5ea028
Author: HIGUCHI Daisuke (VDR dai) <dai at debian.org>
Date:   Sun Dec 11 01:16:42 2016 +0900

    do not pass --skip-grant-tables to mysqld.
    
    - unset plugin for mysql root user.
---
 debian/setup-mysql.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/debian/setup-mysql.sh b/debian/setup-mysql.sh
index 83e383e..4ec6b05 100755
--- a/debian/setup-mysql.sh
+++ b/debian/setup-mysql.sh
@@ -60,8 +60,20 @@ chown $user: $datadir
 
 mysql_install_db --no-defaults --user=$user --datadir=$datadir --rpm --force
 
+tmpf=$(mktemp)
+cat > "$tmpf" <<EOF
+USE mysql;
+UPDATE user SET password=PASSWORD('') WHERE user='root';
+UPDATE user SET plugin='' WHERE user='root';
+FLUSH PRIVILEGES;
+EOF
+
+$mysqld --bootstrap --skip-grant-tables < "$tmpf"
+
+unlink "$tmpf"
+
 # Start the daemon
-$mysqld --skip-grant-tables &
+$mysqld &
 
 pid=$!
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-moneta.git



More information about the Pkg-ruby-extras-commits mailing list