I am using Acquia Dev Desktop to create local Drupal installations. I am also using Bluehost as a service. Unfortunately, Bluehost uses table prefixes for Drupal tables.

So, if I import something locally from BlueHost, I need to set a table prefix in the settings.php:

array(
  'driver' => 'mysql',
  'database' => 'databasename',
  'username' => 'username',
  'password' => 'password',
  'host' => 'localhost',
  'port' => 3306,
  'prefix' => 'myprefix_',
  'collation' => 'utf8_general_ci',
);

Unfortunately, I can't find the proper database settings for the local Acquia MySql database. Acquia does not create a setting.php file on fresh systems too.

Does anyone know those settings? Thanks.

In the case of Windows 8, Acquia Dev Desktop 2 generates the settings file in this location:

C:\Users\\[user]\\.acquia\DevDesktop\DrupalSettings\loc_Testing_local.inc

If you want to know where Acquia Dev Desktop save settings go to your settings.php and paste:

die($_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR']);

Or as @Cameron mentioned in comment it’s better use drush if it is installed:

So

drush php-eval 'echo $_SERVER["DEVDESKTOP_DRUPAL_SETTINGS_DIR"]'

Then you can find where Acquia saved thie file

As example in Windows 8 in:

C:\Users\[user]\.acquia\DevDesktop\DrupalSettings\loc_Testing_local.inc

And in Mac or (Linux) in:

/Users/[yourusername]/.acquia/DevDesktop/DrupalSettings
  • Instead of die, try: drush php-eval 'echo $_SERVER["DEVDESKTOP_DRUPAL_SETTINGS_DIR"]' – Cameron Sep 27 '16 at 12:04
  • @Cameron always drush not installed but die exists anywhere anytime ;) – Yusef Mohamadi Sep 27 '16 at 12:06
  • "Acquia Dev Desktop includes Drush" docs.acquia.com/dev-desktop/sites/drush – Cameron Sep 27 '16 at 12:20
  • @Cameron you right, it's build in in new version ( I mean acquia dev desktop 2) – Yusef Mohamadi Sep 27 '16 at 12:30
  • 1
    @Cameron thanks for your suggestion,it cause I write down better answer. – Yusef Mohamadi Sep 28 '16 at 5:45
up vote 3 down vote accepted

After digging this issue in details, it turns out that the answer to my question is:

  $databases['default']['default'] = array(
    'driver' => 'mysql',
    'database' => 'TheDBNameIChoose',
    'username' => 'drupaluser',
    'password' => '',
    'host' => '127.0.0.1',
    'port' => 33066 );

In fact, Acquia Dev Desktop does automatically generate a setting.php file in the Public file system path (see Home > Administration > Configuration > Media)

  • is my answer more popular than your for this question? – Yusef Mohamadi Sep 11 '16 at 9:50

acquia creates this:

///////////////////////////////////////////////////////////////////////
//             Don't edit anything below this line!                  //
// This section is autogenerated by Acquia Dev Desktop Control Panel //
///////////////////////////////////////////////////////////////////////
//<@@ADCP_CONF@@>
$base_url = 'http://testing.pt:8082';

//D6 DB config
$db_url = 'mysqli://drupaluser@127.0.0.1:33066/acquiaperfumearte';

//D7 DB config
if( !isset($databases) )
      $databases = array();
$databases['default']['default'] = array(
    'driver' => 'mysql',
    'database' => 'acquiaperfumearte',
    'username' => 'drupaluser',
    'password' => '',
    'host' => '127.0.0.1',
    'port' => 33066 );
//</@@ADCP_CONF@@>

If I understand you right you're looking for the "standard" settings.php file to drop into a fresh local installation of Acquia?

If so you can just copy sites/default/default.settings.php to sites/default/settings.php, copy the database information from the settings.php file in your remote installation and tweak the database array to use your local MySQL server.

If you can't find the default settings file, just grab a copy of Drupal and use the one from there. Acquia is essentially a Drupal core with some extra contributed modules and a different install profile so they're interchangeable.

Sorry if I've mis-understood.

  • Yes, I agree with all that, but the issue is that I don't have the user and pwd for the local database. I don't know what Acquia is using. Is there a way to retrieve this somewhere? – Jérôme Verstrynge Feb 17 '12 at 16:36
  • Judging by the comments here you can't retrieve the password as such but you can change it. It might be worth giving that a try – Clive Feb 17 '12 at 16:42

I wrestled with this myself. All the videos, instructions, etc say modify that part of the settings.php but when I looked in sites/default/settings.php all I found was a bunch of "*" and lots of directions. In that code there was the

if( !isset($databases) ) $databases = array(); $databases['default']['default'] = array( 'driver' => 'mysql', 'database' => 'databasename', 'username' => 'drupaluser', 'password' => '', 'host' => '127.0.0.1', 'port' => 33066 );

I think there is a line for "prefix" as well.

What I found was that in the sites/devdesktop/site-name/sites/ directory is a shortcut (I think that is what the little arrow means) which includes a file called "settings.php". THIS settings.php had the non-astericked code lines defining database and user as highlighted in every video tutorial and directions that I read.

After modifying this settings.php, i was able to get my site (partly) working. The other part is dealing with the .htaccess file(s) of which I have not completely fixed.

Wanted to share this as it may help someone / prevent someone from searching for the proper settings.php using aquia devdesktop.

Certainly a bit of a pain - but it seems that acquia is adding their own customization to the core drupal setup so to make it very easy for you to use THEIR cloud services, and certainly made if very difficult for me to figure out what needed to be changed for my site to Godaddy.

$ cat ~/.acquia/DevDesktop/DrupalSettings/cld_environment_mysitename.inc

Look for a .acquia directory in your home directory. It contains credentials for each site in files prefixed with cld_ within subdirectory .acquia/DevDesktop/DrupalSettings

Note that this directory is typically hidden, so you'll need to show hidden files in your home directory. One approach is to use a Terminal emulator to read the contents; files are short.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.