View Single Post
  #1  
Old 02-17-2008, 05:28 PM
nicolaou nicolaou is offline
Private
 
Join Date: Nov 2007
Posts: 2
Smile Dreamweaver and Connecting to a MySql Database

Hello everyone! This is the first time I write in here . . . furthermore i'm quite new, so please be understanding if something I write sounds a bit naive!

My web site is www.bigbangcentral.com

I am working with Dreamweaver CS3 and want to build dynamic web pages using PHP and MySQL. When I used my computer as a local server I managed to do it successfully and created and connected to the MySQL databases and the whole site worked well (it was my testing/experimenting phase)!

My problem now is how to create a database in my real on line web site? I used the phpAdmin from cPanel and created one (and even put data in it) but I can't find the database file. Shouldn't it be stored in a folder somewhere with the rest of the site files?

Secondly how can I connect from Dreamweaver on my local computer with the database in my site?

What is the MySQL server name I should use in order to create the connection?

Are the username and passwords rewuired the same as the ones to register in cPanel? How can I link my site to the database in here?

In cPanel I also created a dummy user with access to the database and the following connection string was generated:

$dbh=mysql_connect ("localhost", "glsteogb_admin", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("glsteogb_members");

But I can't see how it helps me to build the connection that I want with the database.


Please help me out . . . I've spent ages trying to this plus I haven't found any other articles in here that could help me out.
Reply With Quote