PDA

View Full Version : mysql query


Count_Rugen
December 5th, 2002, 07:31 PM
I installed mysql using the module downloaded from entropy.ch which is linked from the Apple developers page.
Using mysql in the terminal, when databases and tables etc.. are created, where are they then located?
Reason being, i want to copy an already existing database to my mac. I tried copying all .frm, .MYI and .MYD file in the "data" folder to;
usr/local/mysql/<database>/data
but this is not correct.
I would appreciate any advice.
Thanks

jwalk76
December 6th, 2002, 06:40 AM
mysqldump old.database > some.text.file

mysql new.database < some.text.file

there are many flags that you can throw to mysqldump so that it only dumps table creation info or only dumps data and not table creation info... read the man page.

cabbage
December 6th, 2002, 11:16 AM
I use phpMyAdmin to export the sql and then insert it into a new database. jwalk76 is correct too.