Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 05-22-2006, 02:38 PM   #1
Member (8 bit)
 
Join Date: Jul 2003
Location: Great Falls, MT
Posts: 149
Send a message via AIM to dragonxx4 Send a message via Yahoo to dragonxx4
Import mySQL tables

i need to import tables into a mySQL database. I have a file called sites.sql that contains the tables, but i have no clue how to import it.
dragonxx4 is offline   Reply With Quote
Old 05-22-2006, 03:51 PM   #2
Wx geek
 
blue60007's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 6,638
Do you have access to something like PHPmyAdmin (it would be in your admin/control panel)? There might be others your host might have installed, but that's the one that I'm familiar with.

I know how to do it if your host uses Cpanel as an admin panel...I'm not familiar with anything else though. Also, you could probably do it in a PHP page if you already have a MySQL database set up.

Also, do you have a MySQL database set up for the tables? Or do you need to do that too? You do have MySQL available with the host you are using?
__________________
"It is the way of man to make monsters and it is the nature of monsters to destroy their makers."

Last edited by blue60007; 05-22-2006 at 03:54 PM.
blue60007 is offline   Reply With Quote
Old 05-22-2006, 04:18 PM   #3
Member (8 bit)
 
Join Date: Jul 2003
Location: Great Falls, MT
Posts: 149
Send a message via AIM to dragonxx4 Send a message via Yahoo to dragonxx4
Quote:
Originally Posted by blue60007
Do you have access to something like PHPmyAdmin (it would be in your admin/control panel)? There might be others your host might have installed, but that's the one that I'm familiar with.

I know how to do it if your host uses Cpanel as an admin panel...I'm not familiar with anything else though. Also, you could probably do it in a PHP page if you already have a MySQL database set up.

Also, do you have a MySQL database set up for the tables? Or do you need to do that too? You do have MySQL available with the host you are using?

I do have phpmyadmin, cpanel, and a database setup and ready for the tables. And yes i am using mySQL, thanks for the quick reply
dragonxx4 is offline   Reply With Quote
Old 05-22-2006, 04:25 PM   #4
Wx geek
 
blue60007's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 6,638
OK good...if you hop into phpmyadmin and select your database from the side menu....on the right you should see a tab named "Import". Go there and you should be able to hit the browse button and select the sites.sql file from your hard drive and it should upload (after hitting Go) and automatically create the tables...
blue60007 is offline   Reply With Quote
Old 05-26-2006, 12:27 PM   #5
Member (8 bit)
 
Join Date: Jul 2003
Location: Great Falls, MT
Posts: 149
Send a message via AIM to dragonxx4 Send a message via Yahoo to dragonxx4
Worked great thabk you for the help
dragonxx4 is offline   Reply With Quote
Old 05-26-2006, 12:50 PM   #6
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
From the command line it is:
Code:
mysql -u username -p database_name < sqldump
This will prompt you for a password and import the file sqldump into your database overwriting anything that is in there.
__________________

Want to Make $$$$ with your Computer? No Risk! Simply press shift-4 four times in a row
mairving is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:09 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2