• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Setup database through plesk but cannot connect

P

product

Guest
I'm trying to connect through dreamweaver but cannot it askes for the mySQL server, the username, password and database name.

I'm not 100% on what to put for the mySQL server. Im using a virtual dedicated server through godaddy. I tried putting the IP address and also localhost but cannot get it to work.. Do I need to set up a DSN because I dont know where to locate that through plesk.. Anything here would help,, I'm new at this. Thank you
 
Depending on how you set it up in Plesk:

This is what you use with PHP.

DB_HOST is 'localhost'
DB_NAME is what you named the database when you created it.
DB_USER is the name of the user for the database when you created it.
DB_PASSWORD is self explanatory.

I am not famaliar with what Dreamweaver is asking for. Maybe you can cross reference the above with what Dreamweaver is calling it.
 
Thanks its actually

mySQL server
username
password
database

Tried localhost for the mysql server but it did not work also tryied my IP address and domain name and nothing.

I hear a lot of people say "it depends on how you set it up in plesk" but when I use plesk there is only one way to set it up,,, I choose a domain, choose add database, pick the name/user/pas and click ok. Is there a different way to set it up?
 
None that I am aware of. To determine if it is Dreamweaver with the problem or your connections, set the following code in a php script and see if it will connect. If you run the script and do not have any error messages, it connects and the problem is in Dreamweaver. If this code gives an error, the problem is the way you setup the db.

<?php
// This file contains the database access information for registered users
define ('DB_USER', 'your username');
define ('DB_PASSWORD', 'your password');
define ('DB_HOST', 'localhost');
define ('DB_NAME', 'your database name');

$dbh=mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("your database name");
?>
 
Back
Top