Move the database from local wamp to live

How can i move the local website with wamp database into live using dreamhost…

I have create the new host and db,username,password in dream host…

Then how can i change my program to access that database using pdo concept in php…

Here my code is

<?Php ///////// Database Details , add here //// $dbhost_name = "localhost"; $database = "saakk"; // Your database name $username = "root"; // Login user id $password = ""; // Login password /////////// End of Database Details ////// //// Set the path for upload directory and thumbnail directory//// $path_upload="indexgallery/"; $path_thumbnail="indexgallery/indexgal_thumb/"; ////End of setting path for uploaded images /// //////// Do not Edit below ///////// try { $dbo = new PDO('mysql:host=localhost;dbname='.$database, $username, $password); } catch (PDOException $e) { print "Error!: " . $e->getMessage() . "
"; die(); } ?>

my dream host :
Host name:saakkkhost.logocar.com
[REDACTED]

How can i change my program to perfectly work with database…
pls help me… iam in new for php…

Please be sure to change the password to the database that you just gave the password for.

I just edited the post. Goodness, please don’t EVER ever ever ever ever EVER post passwords in public places!

You need to change THESE:

$dbhost_name = “localhost”;
$database = “saakk”; // Your database name
$username = “root”; // Login user id
$password = “”; // Login password

Your information for that will be in your panel :slight_smile: Go to the SQL page ( https://panel.dreamhost.com/index.cgi?tree=goodies.mysql& ) and get the DB host (mysql.yourdomain.com normally) and the DB name (often yourdomain_com) and you can see what user has access. Click on the user name to get the password.