Solved

Restoring a SQL database

Posted on 2007-12-03
2
1,440 Views
Last Modified: 2012-08-14
I have a fellow co-worker who I have been helping out with some projects.  I have setup and configured a cacti server for them using fedora, mysql, cacti, php5, etc...

It is all working well but now he wants me to use an old DB file he had saved from his last cacti server to restore to the new database.  It is a six meg text file and phpMyAdmin will not let me import anything larger than 2.4 megs.

I know there has to be a way to restore this, can anyone help?  I have very little mysql knowledge.

Thanks
0
Comment
Question by:savone
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 20395557
you should import that from the command line, using the mysql command line tool.

mysql <connection options>   < yourfile.sql
0
 
LVL 23

Author Comment

by:savone
ID: 20395619
Go it... Thanks...

I used mysql -u root -p cacti < cacti_bu.sql

cacti being my database name and cacti_bu.sql being the backup file.

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MySQL Query for stock delivered and sold 11 45
MySQL Trigger 8 29
Database Design Concept 3 41
Insert with SET how to handle join 6 34
A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now