I need to use environment variables for database settings in config.php. I've never had any problem with LS prior to v. 2.
In the 1.92 config.php, I use this:
$databaselocation = getenv('MYSQL_DB_HOST'); // Network location of your Database - for odbc_mssql or mssqlnative use the mssql servername, not localhost or IP
$databasename = getenv('MYSQL_DB_NAME'); // The name of the database that we will create
$databaseuser = getenv('MYSQL_USERNAME'); // The name of a user with rights to create db (or if db already exists, then rights within that db)
$databasepass = getenv('MYSQL_PASSWORD'); // Password of db user
The structure of the config file has changed in 2, and I tried the following but it isn't working.
$databaselocation = getenv('MYSQL_DB_HOST');
$databasename = getenv('MYSQL_DB_NAME');
$databaseuser = "'".getenv('MYSQL_USERNAME')."'";
$databasepass = "'".getenv('MYSQL_PASSWORD')."'";
$connectstring = "'mysql:host=".$databaselocation.";dbname=".$databasename."'";
...
'components' => array(
'db' => array(
'connectionString' => $connectstring,
'emulatePrepare' => true,
'username' => $databaseuser,
'password' => $databasepass,
'charset' => 'utf8',
'tablePrefix' => 'lime_',
),
etc...