Page 1 of 2

Setting up a database?

Posted: Wed Jul 26, 2006 5:19 pm
by cypher235
ok so i need to set up a database to send the information from a form i created so i can output that to a page i created. i have no clue how to do this, i've tried various tutorial sites and all of them either make no sense at all or don't work when i've done what it told me to do or it's so complicated i can't understand it, could anyone walk me through setting up a php database, forgive me if that's a stupid question but i don't know what im doing and i need to learn somehow, if someone could please help me?

Posted: Wed Jul 26, 2006 5:26 pm
by RobertGonzalez
Do you want to use code to make the database or are you looking to use a database utility like phpMyAdmin? Do you already have a database server setup that you can set your database up on? And what tutorials have you tried?

Might I suggest you download the sample chapters of Kevin Yank's Sitepoint Book Build Your Own Database Driven Website Using PHP & MySQL and have a read through his very well explained set up of PHP, MySQL and the interaction of the two...

Posted: Wed Jul 26, 2006 5:30 pm
by Ambush Commander
I think he's trying to develop locally and is trying to use the database functions (to no avail, since there is no database installed.

Try browsing a little on http://www.mysql.com/

Posted: Wed Jul 26, 2006 5:36 pm
by cypher235
i would like to use a tool such as phpmyadmin but can't figure out how to install it (im on a mac if that makes any difference). i downloaded and installed mysql but it didn't seem to do anything for me
as for tutorials i've tried
http://www.webmonkey.com/webmonkey/99/2 ... rogramming
http://www.freewebmasterhelp.com/tutorials/phpmysql/1
http://livedocs.macromedia.com/dreamwea ... _18_19.htm
http://www.mylittlehomepage.net/comment_script
http://www.phpbuilder.com/

and those are just a few of the sites i've tried that kind of make sense. i've googled so many things such as php tutorials and setting up a php database or mysql/php databases, and i've found a lot of sites that help me in absolutely no way at all. if someone could walk me through getting phpmyadmin installed and how to start creating a database in that way i would appreciate it, (i have dreamweaver 8 installed if there's anything i can do with it to create a database?) but your help would be greatly appreciated

Posted: Wed Jul 26, 2006 5:37 pm
by Ambush Commander
Have you installed MySQL yet?

Posted: Wed Jul 26, 2006 5:40 pm
by cypher235
i installed mysql which i believe was already installed when i installed dreamweaver 8

Posted: Wed Jul 26, 2006 5:41 pm
by Ambush Commander
Okay, can you interface with it manually? (Execute `mysql` in the terminal)

Posted: Wed Jul 26, 2006 5:42 pm
by RobertGonzalez
1. Set up your web server (Apache).
2. Set up PHP.
3. Set up MySQL.
4. Set up phpMyAdmin (using the credentials you established during the MySQL setup).

Let us know if these things have been done, and if not, where you are in the process.

Posted: Wed Jul 26, 2006 5:43 pm
by cypher235
Ambush Commander wrote:Okay, can you interface with it manually? (Execute `mysql` in the terminal)
i have tried that but it gives me a command not found error

Posted: Wed Jul 26, 2006 5:47 pm
by Ambush Commander
Aha. When you mentioned Dreamweaver earlier, did you mean that Dreamweaver installed MySQL for you, or that you had MySQL installed before you installed Dreamweaver?

Because I've never heard of Dreamweaver installing databases for you.

Posted: Wed Jul 26, 2006 5:48 pm
by cypher235
Everah wrote:1. Set up your web server (Apache).
2. Set up PHP.
3. Set up MySQL.
4. Set up phpMyAdmin (using the credentials you established during the MySQL setup).

Let us know if these things have been done, and if not, where you are in the process.
doesn't setting up the web server on my computer mean i would be hosting the site on my computer?(sorry if that was a stupid question) php is installed but i don't know how to set it up, mysql is installed and i also don't know exactly how to set it up, lol (i probably sound really stupid by now but im trying to learn) and as for phpmyadmin i have no clue how to install it, i downloaded it of phpmyadmin's website and all i see is a folder with a bunch of php files in them and no clue how to use those

Posted: Wed Jul 26, 2006 5:51 pm
by Ambush Commander
Well, this clarifies things.

When you're programming PHP, you'll want to have a working LAMP (Apache, MySQL and PHP) installation on your computer so you can test everything on your own computer. Yes, you are hosting a website, but with a quick configuration edit, Apache can only answer local requests (making it hidden from the outside).

So install Apache first.

Posted: Wed Jul 26, 2006 5:51 pm
by cypher235
Ambush Commander wrote:Well, this clarifies things.

When you're programming PHP, you'll want to have a working LAMP (Apache, MySQL and PHP) installation on your computer so you can test everything on your own computer. Yes, you are hosting a website, but with a quick configuration edit, Apache can only answer local requests (making it hidden from the outside).

So install Apache first.
alright then i will do that and get back to you after i have done that

Posted: Wed Jul 26, 2006 5:53 pm
by RobertGonzalez
cypher235 wrote:
Everah wrote:1. Set up your web server (Apache).
2. Set up PHP.
3. Set up MySQL.
4. Set up phpMyAdmin (using the credentials you established during the MySQL setup).

Let us know if these things have been done, and if not, where you are in the process.
doesn't setting up the web server on my computer mean i would be hosting the site on my computer?(sorry if that was a stupid question) php is installed but i don't know how to set it up, mysql is installed and i also don't know exactly how to set it up, lol (i probably sound really stupid by now but im trying to learn) and as for phpmyadmin i have no clue how to install it, i downloaded it of phpmyadmin's website and all i see is a folder with a bunch of php files in them and no clue how to use those
So then are you hosted? If you are on a hosted server, they should already have Apache, PHP and MySQL set up. If that is the case, just use their control panel to set up a database and use the information their control panel gives you to handle your connections and such.

Posted: Wed Jul 26, 2006 6:04 pm
by cypher235
Everah wrote: So then are you hosted? If you are on a hosted server, they should already have Apache, PHP and MySQL set up. If that is the case, just use their control panel to set up a database and use the information their control panel gives you to handle your connections and such.
im not with the host i intend to be on when i finish the web site, im using a free host right now to test the site till it's working then i'll set up a host when it's done or close to done.