Re: Creating Mysql DB with PHP




> 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') ;




.



Relevant Pages

  • Re: hitting the limits
    ... relatively straight forward MySql database. ... 10K visitors a month and an 80Mb database are nothing. ... heavily loaded server. ... But the connection will hang around until the garbage ...
    (comp.lang.php)
  • Re: Database connection error (re-post)
    ... MySQL is a database server, it is not a desktop database like Access, you have to work with directly ... FrontPage Resources, WebCircle, MS KB Quick Links, etc. ...
    (microsoft.public.frontpage.client)
  • Re: Confusion about database updates
    ... all connecting to the same database server. ... MySQL can easily handle many simultaneous clients. ... AlphaCluster all open multiple connections to a MySQL server running on ... Let the MySQL server do that when your client ...
    (comp.lang.java.databases)
  • Re: MySQL Insert Unicode Problem
    ... I'm trying to insert some data from an XML file into MySQL. ... The database server has to support Unicode, ...
    (comp.lang.python)
  • Re: Using MySQL as the backend
    ... I need to learn MySQL, ... > the impression you're not familiar with the concept of a server DB. ... > doesn't need to have Access installed to access the database, ... >> install the server or maybe I have it installed but I just don't know how to ...
    (microsoft.public.access.tablesdbdesign)