diff --git a/pifpaf/drivers/mysql.py b/pifpaf/drivers/mysql.py index 0b12366..88b89f3 100644 --- a/pifpaf/drivers/mysql.py +++ b/pifpaf/drivers/mysql.py @@ -20,13 +20,16 @@ class MySQLDriver(drivers.Driver): super(MySQLDriver, self)._setUp() self.socket = os.path.join(self.tempdir, "mysql.socket") datadir = os.path.join(self.tempdir, "data") + secureprive = os.path.join(self.tempdir, "mysql-files") tempdir = os.path.join(self.tempdir, "tmp") os.mkdir(datadir) + os.mkdir(secureprive) os.mkdir(tempdir) c, _ = self._exec(["mysqld", "--no-defaults", "--tmpdir=" + tempdir, "--initialize-insecure", + "--secure-file-priv=" + secureprive, "--datadir=" + datadir], ignore_failure=True, path=["/usr/libexec"]) @@ -35,10 +38,12 @@ class MySQLDriver(drivers.Driver): c, _ = self._exec(["mysql_install_db", "--no-defaults", "--tmpdir=" + tempdir, + "--secure-file-priv=" + secureprive, "--datadir=" + datadir]) c, _ = self._exec(["mysqld", "--no-defaults", "--tmpdir=" + tempdir, + "--secure-file-priv=" + secureprive, "--datadir=" + datadir, "--socket=" + self.socket, "--skip-networking",