PDA

View Full Version : Help on working with MySQL Databases & PHP in Dreamweaver


duker10
03-02-2008, 12:52 AM
I am new to the world of dynamic webpages. I have been following along on the Lynda.com videos Dreamweaver CS3: Beyond the Basics, and Dreamweaver CS3: Dynamic Development, and have basically got it figured out for doing stuff on my local computer. However, I can't quite figure out what steps I have to take so that I can take my database driven site live. I use hosting with both ASTHost and GoDaddy. My hosting with each, I believe, is on Linux servers (GoDaddy for sure Linux, ASTHost may be MS). I am designing with DW CS3, and using WAMP as the PHP server on my pc. I am also using MySQL version 5.0. My PHP version is 5.1.2 with ASTHost and GoDaddy.

Can anyone point me to a good tutorial or site that explains how to move the site from your own pc at home onto a hosting server and make it work? I have tried a few things, but keep running into MySQL errors.

mangofreak
03-02-2008, 01:25 AM
hi, I just went trhough the same experience as you. I did not find a tutorial but here and there pieces that helped me figure it out.

1. using phpmyadmin, I used the export function. When you click on export, you'll see all the tables of your Db. Make sure they are all selected. Then check mark the save file box. give it a name and go.

Once you have the file done: you can ftp the file to your webhost and depending on your connection and if you have a phpmyadmin on the host, you can use the import tool and call your file. That's that.

Then you have to create a connection to your db from within DW to work on the php pages.

good luck. I'm new to this stuff but it seemed quite straight forward.

;)
keep us updated on your progress.

duker10
03-03-2008, 12:28 AM
It's not getting the DB onto my server - I was able to export then import that fine. I'm just unsure how to set up my site so that it will access the online database rather than the "localhost" one that is set up on my PC.

How do I instruct my page to access the database that is online?

mangofreak
03-03-2008, 01:07 AM
You have to create a connection to connect your application with your db.

go to your Application panel:

Select databases, click on the + sign and fill the information:
connection name: call it whatever you want i.e. connMySQL
MySQL Server: this is the name of your server or your IP address
User name: is the username you have for your db. If local sometimes is Root
password: Whatever password you selected or were assigned
Database: The name of your DB.

Click test. if all good then press OK. If not, go on your need and bow your head until it hits the floor and repeat: Oh lord of mySQL please grant me access to my database. 3 times. Just kidding. :D
Check the video tutorials:
http://www.dreamweaverclub.com/vtm/php-mysql-apache.php
chapters 5, 6, 7 which are explained in detail or

http://www.siteground.com/tutorials/dreamweaver/dreamweaver_mysql.htm

;)