Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Databasing
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 03-28-2008, 01:55 AM
  #1
FWDrew
Soldier (Level 11)
 
FWDrew's Avatar
 
Join Date: Dec 2007
Posts: 113
iTrader: (0)
FWDrew is an unknown quantity at this point
MySQL guide for beginner.

Hi everyone,

Well....I am having a slightly difficult time getting my head around MySQL. I have really gotten to like PHP and gotten used to it and now I discover MySQL and I am just a little confused.

My question is...after searching google I wasn't able to find any "dumbed down" explanations or guides for someone just starting off with MySQL.

Anyway you guys could point me in the right direction with some links or what not would be so helpful

Drew
__________________
Writer for Help-Developer.com || CreatingDrew.com
FWDrew is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-28-2008, 02:14 AM
  #2
rangana
"Resolved" advocate
 
rangana's Avatar
 
Join Date: Jan 2008
Location: Cebu City Philippines
Posts: 2,181
iTrader: (1)
rangana has a spectacular aura aboutrangana has a spectacular aura aboutrangana has a spectacular aura about
W3Schools and Tizag could keep you going

You might also find this link useful
rangana is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-28-2008, 01:08 PM
  #3
FWDrew
Soldier (Level 11)
 
FWDrew's Avatar
 
Join Date: Dec 2007
Posts: 113
iTrader: (0)
FWDrew is an unknown quantity at this point
Quote:
Originally Posted by rangana View Post
W3Schools and Tizag could keep you going

You might also find this link useful
Hi Rangana,


As always, thanks for your help I'll be looking at those links, I cant believe I forgot to go to W3C first...DOH!

I have 2 stupid questions, and I feel so dumb, but I am just gonna put it out there.

1.Ok, so I use godaddy for my host. Now I get 10 MySQL databases with my hosting. I am able to create a new database and a name and password for that database. I am able to log in to "MySQL" (which uses phpMyAdmin). So, do I still need to download MySQL or do I already have it (as I am thinking I do)?

2. Say I have done things correctly and inserted one table into a database....to connect to that database do I just write the command (to connect) on whatever page I am working on?

Regards,

Drew
__________________
Writer for Help-Developer.com || CreatingDrew.com
FWDrew is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-28-2008, 01:31 PM
  #4
putts
SELECT MINE FROM TITLES
 
putts's Avatar
 
Join Date: Nov 2002
Location: Frankenmuth, MI
Posts: 4,918
iTrader: (0)
putts has a spectacular aura aboutputts has a spectacular aura about
1. If you plan on doing development directly on your local machine, you may have to install a local version of mySQL if your code cannot connect to your GoDaddy database. You do not have mySQL locally at this point. GoDaddy serves the database just like they do your PHP code. So the database you have is just an instance of mySQL stored on the GoDaddy servers.

2. PHP is very closely integrated with mySQL and can usually connect to an instance of a mySQL database that is on the same server fairly fluidly. You should really check the PHP documentation and what they might have W3C on it first and see if you can work your way through it yourself that way. Then, if you have more specific questions, I'm sure one of the PHP guys would be able to help you.

Comments on this post
FWDrew agrees: Thanks for the help.
__________________
Signature Image Rotator will return when I have time to fix it

Running Scoreboard
Anthony : 3 points
putts is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 03-30-2008, 03:55 AM
  #5
FWDrew
Soldier (Level 11)
 
FWDrew's Avatar
 
Join Date: Dec 2007
Posts: 113
iTrader: (0)
FWDrew is an unknown quantity at this point
Quote:
Originally Posted by putts View Post
1. If you plan on doing development directly on your local machine, you may have to install a local version of mySQL if your code cannot connect to your GoDaddy database. You do not have mySQL locally at this point. GoDaddy serves the database just like they do your PHP code. So the database you have is just an instance of mySQL stored on the GoDaddy servers.

2. PHP is very closely integrated with mySQL and can usually connect to an instance of a mySQL database that is on the same server fairly fluidly. You should really check the PHP documentation and what they might have W3C on it first and see if you can work your way through it yourself that way. Then, if you have more specific questions, I'm sure one of the PHP guys would be able to help you.
Thank you putts and sorry for the delayed response. I am going to try and install it and I'll let you guys know how it goes. I am sure I will have more detailed questions to come.

Thanks again,

Drew
__________________
Writer for Help-Developer.com || CreatingDrew.com
FWDrew is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 04-03-2008, 12:42 AM
  #6
FWDrew
Soldier (Level 11)
 
FWDrew's Avatar
 
Join Date: Dec 2007
Posts: 113
iTrader: (0)
FWDrew is an unknown quantity at this point
Ok, I believe I am ready for my next question

I have installed MySQL on my computer and have created a database and table on my GD account using phpmyadmin. Now I am attempting to simply connect to the mysql using php.

So far he is what I have gathered:
PHP Code:

<?php
$dbhost 
'localhost';
$dbuser 'root';
$dbpass 'password';

$conn mysql_connect($dbhost$dbuser$dbpass) or die                      ('Error connecting to mysql');

$dbname 'links';
mysql_select_db($dbname);
?>
My question is what should I be entering for $dbhost? Should it be the server ip for myPHP admin account or should it be my server ip for the website I would like to use? Or maybe even a local directory? As you can see I am obviously confused.

Thanks for any help as always.

Drew
__________________
Writer for Help-Developer.com || CreatingDrew.com
FWDrew is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 04-03-2008, 05:37 AM
  #7
Vege
Novice (Level 1)
 
Vege's Avatar
 
Join Date: Sep 2004
Location: Finland
Posts: 2,890
iTrader: (0)
Vege has a spectacular aura aboutVege has a spectacular aura about
if GD stands for godaddy you can find the right hostname in their manuals/instructions.
__________________

i hate you vol 2009
Vege is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Reply


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 09:26 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.