Re: Creating Mysql DB with PHP
- From: "Tony" <someone@xxxxxxxxxxxxx>
- Date: Sat, 4 Jun 2005 12:18:31 -0700
"MS" <nospamplaesegr8t_ukuk@xxxxxxxxxxx> wrote in message
news:d7s6mo$61k$1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> >>
>> >> Are you copying an existing database (since you mention a SQL dump)?
>> >
>> >
>> > I am Copying an existing database, which the sql dump is created from.
>>
>> If the original database is MySQL, then all you need to do is copy the
>> files.
>
> The original is MySQL
<...>
>> I'm guessing from this that it's not necessarily a one-time script, then?
>
> Its not a onetime script as I hope to package all the files together and
> distibute.
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)
If you are running insert queries, the cycle will take much longer as the
database gets bigger, so you will reach a point where PHP timeouts interfere
with running the program. You can change the PHP timeouts, but then you run
into SQL timeouts - and so on :) The database I was working with required
everything to be broken up into smaller pieces & restart the process after a
pause.
Use mysql_create_db() to create the database. Creating a database in MySQL
consists of MySQL creating a directory in the MySQL data folder. All you
need to do after this is copy the 3 relevant database files into that
folder. If they're included with the distribution files, this would be a
simple matter.
Hope that helps at least a little
.
- Follow-Ups:
- Re: Creating Mysql DB with PHP
- From: MS
- Re: Creating Mysql DB with PHP
- References:
- Creating Mysql DB with PHP
- From: MS
- Re: Creating Mysql DB with PHP
- From: Tony
- Re: Creating Mysql DB with PHP
- From: MS
- Re: Creating Mysql DB with PHP
- From: Tony
- Re: Creating Mysql DB with PHP
- From: MS
- Creating Mysql DB with PHP
- Prev by Date: Re: Date recognition
- Next by Date: Forbidden word removal
- Previous by thread: Re: Creating Mysql DB with PHP
- Next by thread: Re: Creating Mysql DB with PHP
- Index(es):
Relevant Pages
|