|
Posted by MS on 06/06/05 19:07
> 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().
My current DB is on my Linux Server, and I don't have access to any MYSQL
directories.
So I think what you are suggesting is not viable for me.
would another possibility be to...
create a PHP file to run SQL that would create the DB and all the tables.
This I don't see a problem with.
but how do you set the connection values...'mysql_user' & 'mysql_password'
within php and relate this to the DB that is to be created.
mysql_connect('localhost', 'mysql_user', 'mysql_password') ;
[Back to original message]
|