faqts : Computers : Databases : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

8 of 18 people (44%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

Database: MySql: Database: Copy: Microsoft: Windows: How to quickly copy a MySql database?

Jul 6th, 2008 13:23
Knud van Eeden, dman,


----------------------------------------------------------------------
--- Knud van Eeden --- 19 May 2005 - 08:38 pm ------------------------

Database: MySql: Database: Copy: Microsoft: Windows: How to quickly 
copy a MySql database?

---

A possible method to quickly copy a MySql database, is to create a new
folder in the 'data' directory of your MySq directory, and to copy
(including subdirectories) the old database folder content in it.

---

Note:

Of course, this method circumvents MySql
itself, so might not work in future versions
of MySql.

---

Steps: Overview:

 1. -Create a new folder in your MySql directory

     1. Open an MSDOS box
        (or use otherwise Microsoft Explorer)

         cd "c:\Program Files\MySQL\MySQL Server 4.1\data"

         md "myDatabaseNew"

 2. -Copy the old folder

         copy "myDatabaseOld" "myDatabaseNew"

 3. -If you now check in MySql, you will see that
     a new copy of the old database has been created.

     1. -Type the SQL command

          show databases;

     2. -That will show amongst others

          myDatabaseOld

          myDatabaseNew

---
---

Internet: see also:

---

Database: MySql: Backup: How to backup your MySql databases on 
Microsoft Windows? [mysqldump.exe]
http://www.faqts.com/knowledge_base/view.phtml/aid/35219/fid/52

---

Database: Relational: MySql: Link: Overview: Can you give an overview 
of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/35331/fid/52

----------------------------------------------------------------------