You are here: Re: Creating Mysql DB with PHP « All PHP « IT news, forums, messages
Re: Creating Mysql DB with PHP

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация