Page 1 of 1

MYSQL: dump

Posted: Fri May 23, 2003 1:29 am
by ngaisteve1
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.

Use Phpmyadmin

Posted: Fri May 23, 2003 2:23 am
by coolpravin
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 :lol:

Posted: Fri May 23, 2003 2:25 am
by twigletmac
phpMyAdmin site ('cause coolpravin didn't give it):
http://www.phpmyadmin.net

Mac

Re: MYSQL: dump

Posted: Fri May 23, 2003 10:36 am
by Wayne Herbert
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. .
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).

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.

Posted: Sun May 25, 2003 8:33 pm
by ngaisteve1
Thanks, Wayne Herbert. That is what I am looking for.