MYSQL: dump
Moderator: General Moderators
-
ngaisteve1
- Forum Newbie
- Posts: 5
- Joined: Wed Apr 30, 2003 3:05 am
MYSQL: dump
I have a table in a database name let's say A. How do I copy and paste (database structure and data) this table to another database let's say B. B already there. I know something like dump table. But, I don't really know how. I am using mysql with control centre. Thanks.
- coolpravin
- Forum Newbie
- Posts: 20
- Joined: Mon May 19, 2003 12:56 am
- Location: India
Use Phpmyadmin
Use Phpmyadmin
A free source script.
Create new database through it.
Select your original database.
Use export option.
and use these sql queries in new database.
Thats it
A free source script.
Create new database through it.
Select your original database.
Use export option.
and use these sql queries in new database.
Thats it
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- Wayne Herbert
- Forum Commoner
- Posts: 34
- Joined: Tue Apr 29, 2003 3:13 pm
- Location: Houston, Texas
Re: MYSQL: dump
If you have direct access to the MySql data directories, then the process is trivially easy (although I agree with the use of phpMyAdmin... a necessity when working with a remote MySql server).ngaisteve1 wrote:I have a table in a database name let's say A. How do I copy and paste (database structure and data) this table to another database let's say B. B already there. .
But if you are local, you will notice that the database name is simply a folder name under the data directory of MySql. For example if you have DbA and DbB, then you'll see:
/MySql/data
/DbA
/DbB
Inside DbA there will be three files with the table name you are interested in. For a table called FRAMMIS, you will see FRAMMIS.MYI, FRAMMIS.MYD, and FRAMMIS.frm. Just copy all three of these files into the /DbB directory, and presto, a new table in DbB.
-
ngaisteve1
- Forum Newbie
- Posts: 5
- Joined: Wed Apr 30, 2003 3:05 am