initDB() {
        if (!fs.existsSync(this.mariadbDataDir)) {
            log.info("mariadb", `Embedded MariaDB: ${this.mariadbDataDir} is not found, create one now.`);
            fs.mkdirSync(this.mariadbDataDir, {
                recursive: true,
            });

            let result = childProcess.spawnSync("mariadb-install-db", [
                "--user=node",
                "--auth-root-socket-user=node",
                "--datadir=" + this.mariadbDataDir,
                "--auth-root-authentication-method=socket",
            ]);

            if (result.status !== 0) {
                let error = result.stderr.toString("utf-8");
                log.error("mariadb", error);
                return;
            } else {
                log.info("mariadb", "Embedded MariaDB: mysql_install_db done:" + result.stdout.toString("utf-8"));
            }
        }

        // Check the owner of the mariadb directory, and change it if necessary
        let stat = fs.statSync(this.mariadbDataDir);
        if (stat.uid !== 1000 || stat.gid !== 1000) {
            fs.chownSync(this.mariadbDataDir, 1000, 1000);
        }

        // Check the permission of the mariadb directory, and change it if it is not 755
        if (stat.mode !== 0o755) {
            fs.chmodSync(this.mariadbDataDir, 0o755);
        }

        if (!fs.existsSync(this.runDir)) {
            log.info("mariadb", `Embedded MariaDB: ${this.runDir} is not found, create one now.`);
            fs.mkdirSync(this.runDir, {
                recursive: true,
            });
        }

        stat = fs.statSync(this.runDir);
        if (stat.uid !== 1000 || stat.gid !== 1000) {
            fs.chownSync(this.runDir, 1000, 1000);
        }
        if (stat.mode !== 0o755) {
            fs.chmodSync(this.runDir, 0o755);
        }
    }
Install MariaDB if it is not installed and make sure the `runDir` directory exists
@returns {void}