summaryrefslogtreecommitdiff
path: root/scripts/mysql_install_db.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mysql_install_db.sh')
-rw-r--r--scripts/mysql_install_db.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 7e9b8a69677..b4cfc054b35 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -358,9 +358,15 @@ do
mkdir -p $dir
chmod 700 $dir
fi
- if test -w / -a ! -z "$user"
+ if test -n "$user"
then
chown $user $dir
+ if test $? -ne 0
+ then
+ echo "Cannot change ownership of the database directories to the '$user'"
+ echo "user. Check that you have the necessary permissions and try again."
+ exit 1
+ fi
fi
done