Results 1 to 2 of 2

Thread: Dreamweaver and Connecting to a MySql Database
      
   

  1. #1
    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.

  2. #2
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default Re: Dreamweaver and Connecting to a MySql Database

    No, MySQL databases doesn't store any files on your on your site itself, its closer to the server root, you don't have direct access to it. You can only query the database.

    I can't help with that one, I use phpMyAdmin or scripts to access data databases.

    To connect remotely to your MySQL database use the ip address of the server. To connect locally use "localhost" (locally as in files on your site that connect to the database).

    The username and password are different from your username/password to login to cpanel. It is created by you on the same page you create your database.

    The generated code is php code to connect to your database. You have to connect to the database before you can query it.

    Heres some php and mysql tutorials
    http://www.tizag.com/phpT/
    http://www.tizag.com/mysqlTutorial/

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49