Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- # Fill our vars and run on cli
- # $ php -f db-connect-test.php
- $dbname = 'name';
- $dbuser = 'user';
- $dbpass = 'pass';
- $dbhost = 'localhost';
- $connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
- mysql_select_db($dbname) or die("Could not open the db '$dbname'");
-
- echo "connected to the database";
- <?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(
- '*' => array(
- 'tablePrefix' => 'craft',
- ),
- '.dev' => array(
- 'server' => 'localhost',
- 'user' => 'root',
- 'password' => 'root',
- 'database' => 'nec',
- ),
- 'nec.dev.stagingdomain.com' => array(
- 'server' => 'localhost',
- 'user' => 'staging-user',
- 'password' => 'staging-password',
- 'database' => 'staging-database',
- ),
- '.com' => array(
- 'server' => 'localhost',
- 'user' => '',
- 'password' => '',
- 'database' => '',
- ),
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement