News Relating to Programming, Network Security, and Technology
Sunday, July 30, 2006
MySQL: Exporting and Importing a database
Working on a presentation I am giving, I needed to export my existing Sguil Database to my laptop. I have years of data in this database, so it provides a good basis for demonstrating some basic reporting principles in BIRT. So I needed to export the data to my local system.
This is actually a very easy thing to accomplish. On the source system, I run the following command:
mysqldump -u -p sguildb > sguildb.sql
Where -u is a switch to accept the database username to use, -p will prompt for a password, and the last entry is the database to export, in this case the sguildb database. Now, I have a large script that will rebuild the Sguil database on my development system in my user directory.
I log into the target system, and copy the script using the following command:
I am a computer programmer by trade, and a fitness enthusiast.
I have been writing about programming for several years, and am the author of "Practical Data Analysis and Reporting with BIRT" and "BIRT 2.6: Data Analysis and Reporting". I am a full time consultant specializing in Business Intelligence, enterprise search, and eCommerce.
I do Gracie Jiu-Jitsu, P90X, and Insanity. I am a BeachBody coach and reseller for P90X, Insanity, and Shakeology.
No comments:
Post a Comment