Page 1 of 1

How do I create a database ?

PostPosted: 06. July 2006 18:31
by waddy
Hello all, I am hoping that someone can advise me how to create a database in SQL. I am learning from a book called 'Dreamweaver MX 2004 with asp, coldfusion and php' by Jeffrey Bardzell. Having lost lots of hair trying to get php 5.. to open the SQL dll libraries, I came across XAMPP which appears to have set it up all for me. Although this book provides the database sql file, I need to get it into SQL to generate the tables etc - but I don't know how to!. The book tells me to execute mysql.exe, type 'source c:\relevantFolders\theDatabase.sql' and enter. Trouble is, the screen disappears before I do any typing (the book is using PHP 4.?.? so it is probably out of date).

Please tell me how to do it so that I can continue to learn! :cry:

Cheers

PostPosted: 06. July 2006 19:21
by Wiedmann
The book tells me to execute mysql.exe,

... from the command line (and not with a doubleclick in explorer)

PostPosted: 07. July 2006 05:02
by Izzy
Use phpMyAdmin, a pre installed feature of XAMPP.

http://127.0.0.1/xampp
Click on your language English perhaps.
Click on phpMyAdmin under the Tools menu.

This tool is a GUI front end to mySQL and contains all the tools to create and manage your databases.

There may be some configurations that need to be applied but the documentation for XAMPP will guide you and of course there is the old fall back to Google.

Post here if you get into difficulties with understanding phpMyAdmin.

I created a comprehensive howto for a member who was having difficulties creating a database for a software install here:
http://community.apachefriends.org/f/viewtopic.php?t=18936
HTH

PostPosted: 07. July 2006 11:59
by waddy
Izzy wrote:Use phpMyAdmin, a pre installed feature of XAMPP.

This tool is a GUI front end to mySQL and contains all the tools to create and manage your databases.

HTH


Thanks Izzy but I think perhaps my problem is slightly different in that I have a database (from the books CD) that just needs 'generating'. I have tried to do this but cannot get the syntax right - I don't know where best to put the existing file either. Would you know where and what to do in phpMyAdmin to 'generate' an existing database? :shock:

Many thanks waddy.

PostPosted: 07. July 2006 15:09
by WooshMan
You need to click import which is at the bottom of the main screen.

then click browse and point it to the file on cd.

It will then create the database and all data in it for you.

Hope that helps.

Woosh