Connecting to database from Dreamweaver CS3

Freelance Web Site Designer

Freelance Web Designer East Sussex

Link Exchange System with Dreamweaver CS3, PHP, MySQL and CSS Part 1

 

<< Database design | Designing template >>

Connecting to database
Depending on what version of the MySQL server you are using you might be having problems in connecting to the MySQL database from Dreamweaver by getting annoying messages saying something about upgrading client to the never version.
To solve this problem open MySQL command prompt (explained on the previous page) and type the following command, replacing root with the username and your_password with your password to MySQL server:

SET PASSWORD FOR ‘root’@’localhost’ = OLD_PASSWORD(‘your_password’);

Once it’s been done type:

FLUSH PRIVILEGES;

Now we will create a file with the connection to our database.
Open Dreamweaver and choose our previously defined project.
In the root of our site´s folder create a file and give it a name of index.php (fig. 10).

Connecting to database from Dreamweaver CS3 Image 1
Fig. 10

Open this file and click Application panel on the right hand side. In Databases tab click "+" sign and choose MySQL Connection (fig. 11)

Connecting to MySQL Database from Dreamweaver CS3 Image 2
Fig. 11

The connection dialogue box will open.
Now fill in all of the fields providing Connection name (conndb), MySQL server (localhost), User name (root), Password (root password to MySQL server). Click on Select button and select dblinks database. Click OK and Test to test if our connection is working.
Click OK to close this dialogue box (Fig. 12).

Connecting to MySQL Database from Dreamweaver CS3 Image 3
Fig. 12

You will see that this operation has created and additional folder in our site´s root called Connections and within this folder there is a file called conndb.php. This file contains information which will allow us to connect to our database.

<< Database design | Designing template >>

 

Website Design Company | Small Business Web Site Design | Ecommerce Web Site Design | Web Design Tutorials
UK Content Management System | Database Design | Flash Animation | Web Designer Resources | Independent Web Hosting Review
Illustrator Tutorial | Web Design Tutorials | Chichester Restaurants
© Freelance Web Designer - Sebastian Sulinski | Valid CSS | Valid XHTML