Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
3 registered (Mike L, Iann128, JimUK), 47 Guests and 16 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/02/04
Posts: 195
Top Posters (30 Days)
Ruben 49
DennyP 24
Gizmo 23
Dunny 18
SteveS 14
AllenAyres 12
dbremer 10
drkknght00 9
SD 9
driv 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Topic Options
#179344 - 02/24/07 01:26 PM How to re-import a DB
Basil Offline
addict
Registered: 08/18/06
Posts: 685
Loc: Southwest US
Need some quicky help. I need to re-import my old threads 65 database, but I can't seem to do it with PhPadmin imort function because the DB file is too big. So, I want to to it as root user via SSH. Ok, so I have uploaded via FTP program my thread65.sql file. I have also created teh threads65 database (which is empty of course). At the command line, I know I can go to MySQL, then say MySQL> use threads65 to change to that database. But I can't remember for sure how to import my threads65.sql file inot the threads56 database. Do I just go to the directory the file is saved in then go to MySQL> use threads65, then at teh MySQL like just type the name of the script file (e.g., MySQL> threads.sql;

Or is there something more to it? It seems like last time I did this I did something like MySQL> databse user > file; but I'm note positive. I know this is simple, I just don't do it enough.

Any help would be appreciated.

Basil
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#179349 - 02/24/07 03:46 PM Re: How to re-import a DB [Re: Basil]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
Basically, just go into the directory where you have your threads65.sql file. At that point you'd type this:

mysql threads65 < threads65.sql -u username -p

Change username to your database username. It will then prompt you for your password, and then it will import your threads65.sql file.
Top
#179369 - 02/24/07 04:56 PM Re: How to re-import a DB [Re: Rick]
Gizmo Offline

Registered: 06/05/06
Posts: 14994
Loc: Portland, OR; USA
In some instances MySQL will not accept the above line due to the host parameter not being utilized, I generally use:

MySQL Export: mysqldump -uusername -ppassword database_name > backup_file.sql
MySQL Import: mysql -h localhost -uusername -ppassword database_name < backup_file.sql
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#179381 - 02/24/07 05:18 PM Re: How to re-import a DB [Re: Gizmo]
Basil Offline
addict
Registered: 08/18/06
Posts: 685
Loc: Southwest US
Thanks guys.
Top



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Custom forum permissions
by ntdoc
05/18/12 02:07 PM
Forum Stats
10489 Members
36 Forums
33841 Topics
181698 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image