diff --git a/plugins/mariadb/index.py b/plugins/mariadb/index.py index 2777a1fbe..93c457172 100755 --- a/plugins/mariadb/index.py +++ b/plugins/mariadb/index.py @@ -335,6 +335,10 @@ def initMysqlData(): data = mw.execShell(cmd) # print(data[0]) # print(data[1]) + + if not mw.isAppleSystem(): + mw.execShell('chown -R mysql:mysql ' + serverdir + '/data') + mw.execShell('chmod -R 755 ' + serverdir + '/data') return False return True diff --git a/plugins/mysql-apt/index.py b/plugins/mysql-apt/index.py index dad39ae3e..8b77ba3ed 100755 --- a/plugins/mysql-apt/index.py +++ b/plugins/mysql-apt/index.py @@ -281,7 +281,7 @@ def initMysql57Data(): if not mw.isAppleSystem(): mw.execShell('chown -R mysql:mysql ' + datadir) - mw.execShell('chmod 755 ' + datadir) + mw.execShell('chmod -R 755 ' + datadir) return False return True