<p>This:</p>

<pre><code>// The name of the database to select.
'd&lt;my acct #&gt;_onehanders_db' =&gt; '',
</code></pre>

<p>Needs to be this:</p>

<pre><code>// The name of the database to select.
'database' =&gt; 'd&lt;my acct #&gt;_onehanders_db',
</code></pre>

CC BY-SA 3.0
2016-04-03T23:25:12.813Z
Thanks Brad. That was a rather egregious error. My apologies.
Bob Monsour
CC BY-SA 3.0
2016-04-03T23:31:37.070Z
I forgot to say, explicitly...that worked! My installation was successful. Thanks again.
Bob Monsour
CC BY-SA 3.0
2016-04-03T23:33:01.887Z
No worries, @BobMonsour. And bonus points for using the word "egregious". :)
Brad Bell
CC BY-SA 3.0
2016-04-03T22:24:03.690Z
2016-04-03T22:24:03.690Z
Brad Bell
<p>I'm getting an error when I start the installation process, i.e., <code>&lt;domain&gt;/admin</code>. </p>

<p>Here's the error I'm getting:</p>

<pre><code>CDbCommand failed to execute the SQL statement: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected. The SQL statement executed was: SHOW TABLES LIKE 'craft_%'
</code></pre>

<p>Since I've enabled dev mode, you can see the full stack trace here: </p>

<p><a href="http://onehanders.info/admin" rel="nofollow">http://onehanders.info/admin</a></p>

<p>I've done the following prior to starting the install:</p>

<ul>
<li><p>set up db and identified server, db name, user, &amp; password that are needed</p></li>
<li><p>put proper settings in db.php in the config folder</p></li>
<li><p>put the craft folder one level above web root</p></li>
<li><p>updated all 3 of the relevant folder permissions (including enclosed)</p></li>
<li><p>enabled dev mode in <code>general.php</code></p></li>
</ul>

<p>I even added a statement to <code>craft/etc/behaviors/AppBehaviors.php</code>. After line 852, at which point the db connection appears to be valid, I echo'd a "db connection is valid" line and got there. That line is now commented out.</p>

<p>I'd love to hear your thoughts on what I might try to fix this.</p>

<p>Contents of <code>config/db.php</code>:</p>

<pre><code>&lt;?php

/**
* Database Configuration
*
* All of your system's database configuration settings go in here.
* You can see a list of the default settings in craft/app/etc/config/defaults/db.php
*/

return array(

// The database server name or IP address. Usually this is 'localhost' or '127.0.0.1'.
'server' =&gt; 'internal-db.s&lt;my acct #&gt;.gridserver.com',

// The name of the database to select.
'd&lt;my acct #&gt;_onehanders_db' =&gt; '',

// The database username to connect with.
'user' =&gt; 'db&lt;my acct #&gt;',

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

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

);
</code></pre>

CC BY-SA 3.0
2016-04-02T23:19:48.527Z
Shot in the dark, but try this fix: https://craftcms.com/support/forms-returning-json
Brad Bell
CC BY-SA 3.0
2016-04-03T17:02:49.260Z
Thanks for the try Brad, but I've already done that.
Bob Monsour
CC BY-SA 3.0
2016-04-03T20:57:05.593Z
Can you share the contents of your `craft/config/db.php` file (with the sensitive bits redacted)?
Brad Bell
CC BY-SA 3.0
2016-04-03T21:53:59.023Z
Sure. I'll edit the post to include it.
Bob Monsour
CC BY-SA 3.0
2016-04-03T22:25:03.303Z
Added an answer.
Brad Bell
<installation>
Problem installing on MediaTemple
# Problem installing on MediaTemple

(Asked by: username_0 on 2016-04-02)

I'm getting an error when I start the installation process, i.e., /admin. 
Here's the error I'm getting:
CDbCommand failed to execute the SQL statement: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected. The SQL statement executed was: SHOW TABLES LIKE 'craft_%'

Since I've enabled dev mode, you can see the full stack trace here: 
http://onehanders.info/admin
I've done the following prior to starting the install:

set up db and identified server, db name, user, & password that are needed
put proper settings in db.php in the config folder
put the craft folder one level above web root
updated all 3 of the relevant folder permissions (including enclosed)
enabled dev mode in general.php

I even added a statement to craft/etc/behaviors/AppBehaviors.php. After line 852, at which point the db connection appears to be valid, I echo'd a "db connection is valid" line and got there. That line is now commented out.
I'd love to hear your thoughts on what I might try to fix this.
Contents of config/db.php:
 'internal-db.s.gridserver.com',

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

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

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

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

);

**Tags:** installation
> **Comments:**
> **username_1**: Shot in the dark, but try this fix: https://craftcms.com/support/forms-returning-json  
> **username_0**: Thanks for the try Brad, but I've already done that.  
> **username_1**: Can you share the contents of your `craft/config/db.php` file (with the sensitive bits redacted)?  
> **username_0**: Sure. I'll edit the post to include it.  
> **username_1**: Added an answer.  

---

## 1 answers

### Answer by username_1 on 2016-04-03. Score: 0 | Accepted answer

This:
// The name of the database to select.
'd_onehanders_db' => '',

Needs to be this:
// The name of the database to select.
'database' => 'd_onehanders_db',

> **Comments:**
> **username_0**: Thanks Brad. That was a rather egregious error. My apologies.  
> **username_0**: I forgot to say, explicitly...that worked! My installation was successful. Thanks again.  
> **username_1**: No worries, @BobMonsour. And bonus points for using the word "egregious". :)  

---

