{"record":{"id":"57b5dad8aa5eb6a4","repo":"flarum/framework","slug":"currently-only-mysql-mariadb-sqlite-and-postgresql-are","errorCode":null,"errorMessage":"Currently, only MySQL, MariaDB, SQLite and PostgreSQL are supported.","messagePattern":"Currently, only MySQL, MariaDB, SQLite and PostgreSQL are supported\\.","errorType":"validation","errorClass":"ValidationFailed","httpStatus":null,"severity":"error","filePath":"framework/core/src/Install/DatabaseConfig.php","lineNumber":48,"sourceCode":"\n    public function toArray(): array\n    {\n        return array_merge([\n            'driver' => $this->driver,\n            'database' => $this->database,\n            'prefix' => $this->prefix,\n            'prefix_indexes' => true\n        ], $this->driverOptions());\n    }\n\n    private function validate(): void\n    {\n        if (empty($this->driver)) {\n            throw new ValidationFailed('Please specify a database driver.');\n        }\n\n        if (! in_array($this->driver, ['mysql', 'mariadb', 'sqlite', 'pgsql'])) {\n            throw new ValidationFailed('Currently, only MySQL, MariaDB, SQLite and PostgreSQL are supported.');\n        }\n\n        if (empty($this->host) && in_array($this->driver, ['mysql', 'mariadb', 'pgsql'])) {\n            throw new ValidationFailed('Please specify the hostname of your database server.');\n        }\n\n        if (($this->port < 1 || $this->port > 65535) && in_array($this->driver, ['mysql', 'mariadb', 'pgsql'])) {\n            throw new ValidationFailed('Please provide a valid port number between 1 and 65535.');\n        }\n\n        if (empty($this->database)) {\n            throw new ValidationFailed('Please specify the database name.');\n        }\n\n        if (empty($this->schema) && $this->driver == 'pgsql') {\n            throw new ValidationFailed('Please specify the schema name.');\n        }\n","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/flarum/framework/blob/4b939f685389bfe8a380e9e28ddf305a1c66950c/framework/core/src/Install/DatabaseConfig.php#L30-L66","documentation":"DatabaseConfig::validate() restricts drivers to mysql, mariadb, sqlite and pgsql. Any other driver value throws ValidationFailed listing the supported engines, because the installer only ships drivers for those databases.","triggerScenarios":"Constructing DatabaseConfig with driver 'sqlsrv', 'oracle', or any value outside the four allowed; typos like 'postgres' or 'mysql2'.","commonSituations":"Users on SQL Server or other unsupported engines attempting installation; typo'd driver names ('postgres' instead of 'pgsql').","solutions":["Use one of the supported drivers: mysql, mariadb, sqlite, pgsql","Fix the driver spelling (e.g. 'postgres' → 'pgsql')","Migrate the database to a supported engine before installing","Add a third-party storage/driver extension if one exists for your engine"],"exampleFix":"// before\n$configuration = ['driver' => 'postgres', ...];\n// after\n$configuration = ['driver' => 'pgsql', ...];","handlingStrategy":"validation","validationCode":"$allowed = ['mysql', 'mariadb', 'sqlite', 'pgsql'];\nif (! in_array($configuration['driver'] ?? '', $allowed, true)) {\n    throw new ValidationFailed('Driver must be one of: '.implode(', ', $allowed));\n}","typeGuard":null,"tryCatchPattern":"try {\n    $dbConfig = new DatabaseConfig($configuration);\n} catch (ValidationFailed $e) {\n    $output->writeln(\"<error>{$e->getMessage()}</error>\");\n    return Command::FAILURE;\n}","preventionTips":["Use only mysql, mariadb, sqlite or pgsql as the install driver","Watch for the pgsql (not postgres) naming convention","Verify engine availability (extensions/pdo drivers) before choosing a driver"],"tags":["database","configuration","installation","unsupported-value"],"backgroundTag":"unsupported-enum-value","analyzedSha":"4b939f685389bfe8a380e9e28ddf305a1c66950c","analyzedAt":"2026-09-15T18:09:20.879Z","contentChangedAt":"2026-09-15T18:09:20.879Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}