File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 119
119
# circumstances as it contains scripts that are executed by root.
120
120
set +e
121
121
chown -R 0:0 $mysql_statedir
122
- chown -R mysql $mysql_datadir
122
+ find $mysql_datadir ! -uid $( id -u mysql) -print0 | xargs -0 -r chown mysql
123
123
chown -R mysql:adm $mysql_logdir
124
124
chmod 2750 $mysql_logdir
125
125
set -e
144
144
bash /usr/bin/mysql_install_db --rpm --cross-bootstrap --user=mysql --disable-log-bin 2>&1 | $ERR_LOGGER
145
145
set -e
146
146
147
-
147
+
148
148
# # On every reconfiguration the maintenance user is recreated.
149
149
#
150
150
# - It is easier to regenerate the password every time but as people
163
163
# the old query which always succeeds and then the new which may or may not.
164
164
165
165
# recreate the credentials file if not present or without mysql_upgrade stanza
166
- dc=$mysql_cfgdir /debian.cnf;
166
+ dc=$mysql_cfgdir /debian.cnf;
167
167
if [ -e " $dc " -a -n " ` fgrep mysql_upgrade $dc 2> /dev/null` " ]; then
168
168
pass=" ` sed -n ' s/^[ ]*password *= *// p' $dc | head -n 1` "
169
169
else
Original file line number Diff line number Diff line change 199
199
# The "set +e" is necessary as e.g. a ".journal" of a ext3 partition is
200
200
# not chgrp'able (#318435).
201
201
set +e
202
- chown mysql:mysql $mysql_datadir
202
+ find $mysql_datadir ! -uid $( id -u mysql ) -print0 | xargs -0 -r chown mysql
203
203
find $mysql_datadir -follow -not -group mysql -print0 2> /dev/null \
204
204
| xargs -0 --no-run-if-empty chgrp mysql
205
205
set -e
You can’t perform that action at this time.
0 commit comments