Logout Developer Knowledgebase Search Adobe Partners Main Adobe Solution Partner Finder Adobe Solution Partner Program Support Developer Knowledgebase Adobe Solution Partner Program Products & Technology Adobe
Developer Knowledgebase

Knowledgebase HomeGoLive KB

Overview
Software Development Kits
Developer Knowledgebase
Support
Legal Notices
Feedback
Adobe Solution Partner Program
Join
Find a Solution Partner

Product
GoLive
 
Version
6.0
 
Last Edited
12-Nov-2003
 
Document
52353

How To: How do I copy or move a MySQL database?

Summary
You cannot reliably move a MySQL database by moving the binary files in the MySQL directory. Use the procedure that follows.


Issue
How do I copy or move a MySQL database

Applies to: MySQL

Solution
Unlike Microsoft Access, MySQL databases are not simple files. You cannot reliably move a MySQL database by moving the binary files in the MySQL directory. Use the procedure that follows.

Dump the mysql database to a text file using the mysqldump command. This creates a file with SQL commands to re-create the tables and contents. To use the file, you start the mysql command interface, create and use the database and give the command "source your_filename" which reads and executes the commands from the dump file.

To dump a database: (MacOSX example; Windows has slightly different paths):
   cd /usr/local/mysql/bin
   ./mysqldump golive_samples > ~/Desktop/golive_samples.sql

This writes the database golive_samples into a file called golive_samples.sql on your desktop.

To load the database
   cd /usr/local/mysql/bin
   ./mysql
   create database golive_test
   use golive_test
   source ~/Desktop/golive_samples.sql

This will create a new database called golive_test and create the tables and insert the data that were present in golive_samples.

back to top
Was this Knowledgebase document helpful? Yes  No
The articles in this knowledgebase are intended for use by software programmers currently using an Adobe SDK to extend or customize an Adobe product. These articles may be highly technical in nature.
If you have questions about an Adobe Product that are not related to development or an SDK product please visit: http://adobe.com/support/main.html
Copyright © Adobe Systems Incorporated. All rights reserved.
Terms of Use
Online Privacy Policy