Guest User

Untitled

a guest
Aug 6th, 2016
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2. $username = "naveenkumar";
  3. $password = "naveenkumar";
  4. $hostname = "test-db.clvf02gpleds.us-west-2.rds.amazonaws.com:3306";
  5. $dbname = "cloud";
  6.  
  7. //connection to the database
  8. $dbhandle = mysql_connect($hostname, $username, $password)
  9. or die("Unable to connect to MySQL");
  10. echo "Connected to MySQL using username - $username, password - $password, host - $hostname<br>";
  11. $selected = mysql_select_db("$dbname",$dbhandle)
  12. or die("Could not select database");
  13. echo "Connected to Database - $dbname";
  14. ?>
Add Comment
Please, Sign In to add comment