I am a bit of a PHP/MySQL noob and i am having trouble getting my MySQL database to work on my remote server (it works on my local server).
Locally i have:
Connection Name: local
MySQL server: localhost
User Name: root
Remotely I have:
Created a database using:
username: wbgt (although it displays it as "web100-wbgt")
I have also imported the MySQL database on the remote server.
When I try to access any page that uses the MySQL database it comes up blank!
Thanks in advance for your help
What i have done is:
1 - Created a database and used it on my local server
2 - Created a database on my interent service provider
3 - Exported my local database and imported using phpmyadmin on my web hosting website
When you say dp.php do you mean the connection file, if so mine is local.php:-
$hostname_local = "localhost";
$database_local = "wbgt";
$username_local = "wbgt"; (I changed this from root on my local server to wbgt as my web hosting service wont allow me to put root as a username)
$password_local = "root";
$local = mysql_pconnect($hostname_local, $username_local, $password_local) or trigger_error(mysql_error(),E_USER_ERROR);
I don't know how to connect to the remote server from within dreamweaver or if it is even possible.
There seems to be some error in the connection path of your DB connection script - as you said its working locally but not remotely.
The code you've posted looks like a Dreamweaver generated code.
We're down to 2 options now:
In your 1st post when you say (although it displays username as web100-wbgt), you should probably put that as your username on your remote server to see if it works as most hosts prefix your cPanel username to the DB username. Try if this works.
Else, proceed to Option 2:
In Dreamweaver, define your site with Local & Testing Server info. Window > Databases. This should bring up the Databases panel. Click on the PLUS sign on top and click MySQL Connection. Define your MySQL DB values here and hit Test. See if the test happens successfully. If it does, you're good to go with the same settings. Else, there's something wrong with the credentials you've entered.
Thanks! I got confused that it wasn't connecting to the remote server.
If anyone else is in a similar situation that i was.
I am using heartinternet.co.uk