|
Posted by Tony on 06/06/05 18:12
"MS" <nospamplaesegr8t_ukuk@yahoo.co.uk> wrote in message
news:d81hfj$2hm$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
>> It occurs to me that you could include the database files with the
> package,
>> and have the configuration script copy them into the correct directory.
> This
>> is much faster than running it as queries, and you won't face the
> drawbacks
>> with copying the database a row at a time (or running it from a dump)
>>
>
> I would try this... But can you tell me where the database files are ?
>
> Alex.
>
Typically, they would be under the "data" directory under MySQL.
For example - I have a windows system running MySQL - the program is in
C:\Program Files\MySQL\MySQL Server 4.1\
Let's say I wanted a database called "myDB"
The data would be found in C:\Program Files\MySQL\MySQL Server
4.1\data\myDB\ - Typically, there would be 3 files for each table on the
database: with the extensions .frm, .MYI, and .MYD - (NOTE: Some of my
databases only have a .frm, and a single db.opt file)
Basically, just copy the contents of that database file to the new database
file. It would be preferable to have the system create the database folder
(so don't just copy the folder - copy it's contents), as mentioned before
using mysql_create_db().
[Back to original message]
|