<p>Solution found:</p>

<p>I copied again all files to the root folder, changed the very same settings and got it to work - for whatever reason it seems that with the first attempt some files where missing.</p>

<p>@Brad: Thanks for taking the time - the shared infos are of help anyway.</p>

CC BY-SA 3.0
2014-08-26T22:19:39.560Z
No problem... glad you got it sorted.
Brad Bell
CC BY-SA 3.0
2014-08-26T22:15:54.143Z
2014-08-26T22:15:54.143Z
frank
<p>I am trying to install a craft playground using vagrant and puppet.
After firing the default installation for a LAMP stack and creating related DB and User, granting privileges, ... I want to start the craft installation, all I get is:</p>

<blockquote>
  <p>Craft can’t connect to the database with the credentials in craft/config/db.php.</p>
</blockquote>

<p>The commands I am using to create the DB:</p>

<pre><code>CREATE DATABASE craftdb CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER craftadmin@localhost IDENTIFIED BY 'ThisPassword';
GRANT ALL PRIVILEGES ON craftdb.* TO craftadmin@localhost;
FLUSH PRIVILEGES;
EXIT
</code></pre>

<p>The dp.php looks like this:</p>

<pre><code>// The database server name or IP address. Usually this is 'localhost' or '127.0.0.1'.
'server' =&gt; 'localhost',

// The database username to connect with.
'user' =&gt; 'craftadmin',

// The database password to connect with.
'password' =&gt; 'ThisPassword',

// The name of the database to select.
'database' =&gt; 'craftdb',

// The prefix to use when naming tables. This can be no more than 5 characters.
'tablePrefix' =&gt; '',
</code></pre>

<p>PHP Packages installed:</p>

<pre><code>"php5",
"php5-common",
"php5-cli",
"php5-mysql",
"php5-sqlite",
"php-pear",
"php5-dev",
"php5-gd",
"php5-curl",
"php5-mcrypt",
"libapache2-mod-php5"
</code></pre>

<p>Any suggestions are much appreciated</p>

CC BY-SA 3.0
2014-08-26T19:26:00.133Z
Not really an answer, but lots of Craft + Vagrant tips and tricks here: https://plus.google.com/communities/106505340287442511226/s/vagrant and a whole Craft + Vagrant video here: https://plus.google.com/events/ccrgrlhqest2tdnlht3oge51opg?authkey=CMm6o8fHmdGqrAE
Brad Bell
CC BY-SA 3.0
2014-08-26T20:34:21.697Z
thx for the hint, the video I know, the first link shows me some topics that are of help for further dev, but I doubt that this is a permission issue (assuming I would get another error then), however, I will check on permissions. Thanks for the hint. one more thing brad: can you confirm that I got all required php modules? I am not really confident about them...
frank
CC BY-SA 3.0
2014-08-26T20:51:17.923Z
Ben Crocker has a nice stand-alone requirement checker you can run outside of Craft: https://github.com/putyourlightson/craft-requirements
Brad Bell
<config><install>
Craft on Vagrant: Please advise on initial install (Craft can’t connect to the database with the credentials in craft/config/db.php.)
# Craft on Vagrant: Please advise on initial install (Craft can’t connect to the database with the credentials in craft/config/db.php.)

(Asked by: username_0 on 2014-08-26)

I am trying to install a craft playground using vagrant and puppet.
After firing the default installation for a LAMP stack and creating related DB and User, granting privileges, ... I want to start the craft installation, all I get is:

Craft can’t connect to the database with the credentials in craft/config/db.php.

The commands I am using to create the DB:
CREATE DATABASE craftdb CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER craftadmin@localhost IDENTIFIED BY 'ThisPassword';
GRANT ALL PRIVILEGES ON craftdb.* TO craftadmin@localhost;
FLUSH PRIVILEGES;
EXIT

The dp.php looks like this:
// The database server name or IP address. Usually this is 'localhost' or '127.0.0.1'.
'server' => 'localhost',

// The database username to connect with.
'user' => 'craftadmin',

// The database password to connect with.
'password' => 'ThisPassword',

// The name of the database to select.
'database' => 'craftdb',

// The prefix to use when naming tables. This can be no more than 5 characters.
'tablePrefix' => '',

PHP Packages installed:
"php5",
"php5-common",
"php5-cli",
"php5-mysql",
"php5-sqlite",
"php-pear",
"php5-dev",
"php5-gd",
"php5-curl",
"php5-mcrypt",
"libapache2-mod-php5"

Any suggestions are much appreciated

**Tags:** config, install

> **Comments:**
> **username_1**: Not really an answer, but lots of Craft + Vagrant tips and tricks here: https://plus.google.com/communities/106505340287442511226/s/vagrant and a whole Craft + Vagrant video here: https://plus.google.com/events/ccrgrlhqest2tdnlht3oge51opg?authkey=CMm6o8fHmdGqrAE  
> **username_0**: thx for the hint, the video I know, the first link shows me some topics that are of help for further dev, but I doubt that this is a permission issue (assuming I would get another error then), however, I will check on permissions. Thanks for the hint. one more thing brad: can you confirm that I got all required php modules? I am not really confident about them...  
> **username_1**: Ben Crocker has a nice stand-alone requirement checker you can run outside of Craft: https://github.com/putyourlightson/craft-requirements  

---

## 1 answers

### Answer by username_0 on 2014-08-26. Score: 1 | Accepted answer

Solution found:

I copied again all files to the root folder, changed the very same settings and got it to work - for whatever reason it seems that with the first attempt some files where missing.

@Brad: Thanks for taking the time - the shared infos are of help anyway.

> **Comments:**
> **username_1**: No problem... glad you got it sorted.  

---

