Go Back   Dedicated Server Hosting | VPS Hosting | Virtual Private Servers Forum > Support > MySQL Issues.
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 06-17-09, 03:12
BOD Member
 
Join Date: May 2009
Posts: 50
Default Newbie needs some help

I'm a complete newbie to MySQL and PHP. I have a database in MySQL on my local PC. I have already part of my website on-line (the part without PHP).

My questions are:
1. How do I create my database on-line? So far I have done it manualy, but I wonder if there isn't a way to generate scripts and execute them on the server.
2. Once I have that database, how do I get the data in that database? I assume there is a way to import and export data.
3. The ID's of my tables are generated with autoincrement, but how can I get the foreign keys in my others correct so that everything is linked correctly.

Like I said I am a complete newbie.
Reply With Quote
  #2 (permalink)  
Old 06-18-09, 04:04
Moderator
 
Join Date: Mar 2009
Posts: 363
Default

Hi,

Before I come on to the questions, it would be nice to know if your website is hosted somewhere? Generally a control panel makes things easier.
Reply With Quote
  #3 (permalink)  
Old 06-18-09, 12:59
Shane Phillips's Avatar
Chief Operating Officer
 
Join Date: Dec 2006
Posts: 1,057
Send a message via AIM to Shane Phillips Send a message via MSN to Shane Phillips
Default

Quote:
Originally Posted by lucy2u View Post
I'm a complete newbie to MySQL and PHP. I have a database in MySQL on my local PC. I have already part of my website on-line (the part without PHP).

My questions are:
1. How do I create my database on-line? So far I have done it manualy, but I wonder if there isn't a way to generate scripts and execute them on the server.
2. Once I have that database, how do I get the data in that database? I assume there is a way to import and export data.
3. The ID's of my tables are generated with autoincrement, but how can I get the foreign keys in my others correct so that everything is linked correctly.

Like I said I am a complete newbie.
In respect with your questions, i have answered them as follows :

1. How do I create my database on-line? So far I have done it manualy, but I wonder if there isn't a way to generate scripts and execute them on the server.
Ans. You can creae databases via a control panel and in order to generate scripts and execute them you will require SSH access.

2. Once I have that database, how do I get the data in that database? I assume there is a way to import and export data.
Ans. Once you have a database, you can create a .SQL file on your local machine and restore the file in your database.

3. The ID's of my tables are generated with autoincrement, but how can I get the foreign keys in my others correct so that everything is linked correctly.
Ans. Following is an example which will give you a better idea :

emp_tbl
emp_id Primary Key
emp_number Foreign Key
emp_name
emp_add

salary_tbl
sal_id Primary Key
emp_id Foreign Key
sal_amt

Regards,

Shane Phillips
__________________
Redundant Dedicated Server Hosting Solutions Only at BODHost
24x7 Toll-Free ph. : +1. 866-662-0909
Email : sales@bodhost.com | MSN : sales@bodhost.com
Reply With Quote
Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 04:09.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2008, BODHost.com. All rights reserved.