Advertisement
Guest User

Untitled

a guest
Jul 21st, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. <?php
  2. # Fill our vars and run on cli
  3. # $ php -f db-connect-test.php
  4. $dbname = 'name';
  5. $dbuser = 'user';
  6. $dbpass = 'pass';
  7. $dbhost = 'localhost';
  8. $connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
  9. mysql_select_db($dbname) or die("Could not open the db '$dbname'");
  10. echo "connected to the database";
  11.  
  12. <?php
  13. /**
  14. * Database Configuration
  15. *
  16. * All of your system's database configuration settings go in here.
  17. * You can see a list of the default settings in craft/app/etc/config/defaults/db.php
  18. */
  19. return array(
  20. '*' => array(
  21. 'tablePrefix' => 'craft',
  22. ),
  23. '.dev' => array(
  24. 'server' => 'localhost',
  25. 'user' => 'root',
  26. 'password' => 'root',
  27. 'database' => 'nec',
  28. ),
  29. 'nec.dev.stagingdomain.com' => array(
  30. 'server' => 'localhost',
  31. 'user' => 'staging-user',
  32. 'password' => 'staging-password',
  33. 'database' => 'staging-database',
  34. ),
  35. '.com' => array(
  36. 'server' => 'localhost',
  37. 'user' => '',
  38. 'password' => '',
  39. 'database' => '',
  40. ),
  41. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement