Backdrop 1.0.0 introduced a simple configuration string for sites that only had a single database.
$database = 'mysql://user:pass@hostname/database_name';
$database_prefix = '';
The aim was to simplify configuration by avoiding the more complex array that was used in Drupal 7 and is used internally by Backdrop.
$databases['default']['default'] = array(
'driver' => 'mysql',
'database' => 'database_name',
'username' => 'user',
'password' => 'pass',
'host' => 'hostname',
);
However, as site owners started to use more complex database passwords, this caused the simplified format to break and the site would not load. This was partially addressed by URL encoding the user
, pass
, and database_name
strings but this negated efforts to simplify the database configuration and also failed with certain character combinations.
Backdrop 1.30.0 changes the default database configuration to a simple array:
$database = array(
'database' => 'database_name',
'username' => 'user',
'password' => 'pass',
'host' => 'host_name',
);
This supports complex passwords without URL encoding so it is easier to set the database settings directly in settings.php
.
Backdrop continues to support any site that uses the simple configuration string as well as the more complex $databases
array.