also chown the data dir
This commit is contained in:
parent
e9f0304525
commit
bad8721b44
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue