Created
November 20, 2013 22:38
-
-
Save davidneedham/7572429 to your computer and use it in GitHub Desktop.
Put at your www root when syncing with a project that uses eosrei's Git-Dev-Workflow. This way you don't have to change database connection info when moving your code between the server and local.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A gdw.settings.php files for local D7 development. Store in /var/www. | |
*/ | |
// Site is stored in '/var/www/example', so database name is 'example' | |
$database = basename(getcwd()); | |
$databases = array ( | |
'default' => array ( | |
'default' => array ( | |
'database' => $database, | |
'username' => 'root', | |
'password' => 'PASSWORD', | |
'host' => 'localhost', | |
'port' => '', | |
'driver' => 'mysql', | |
'prefix' => '', | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Two updates, change password line:
'password' => 'PASSWORD',
Replace PASSWORD with your local account password.
Also, use this host file definition, because Drush likes to use 127.0.0.1 instead of localhost:
'host' => php_sapi_name() == 'cli' ? '127.0.0.1' : 'localhost',