also chown the data dir

This commit is contained in:
mh 2013-12-04 23:19:09 +01:00
parent e9f0304525
commit bad8721b44
2 changed files with 5 additions and 1 deletions

View file

@ -13,8 +13,11 @@ UPDATE mysql.user SET Password=PASSWORD('$rootpw') WHERE User='root' AND Host='l
FLUSH PRIVILEGES;
EOF
killall mysqld
sleep 15
# chown to be on the safe side
chown mysql.mysql /var/lib/mysql/mysql-bin.*
ls -al /var/lib/mysql/mysql-bin.* &> /dev/null
[ $? == 0 ] && chown mysql.mysql /var/lib/mysql/mysql-bin.*
chown -R mysql.mysql /var/lib/mysql/data/
/sbin/service mysqld start

View file

@ -17,6 +17,7 @@ sleep 15
# chown to be on the safe side
ls -al /var/lib/mysql/mysql-bin.* &> /dev/null
[ $? == 0 ] && chown mysql.mysql /var/lib/mysql/mysql-bin.*
chown -R mysql.mysql /var/lib/mysql/data/
/etc/init.d/mysql start