Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL Environment vs simple Standalone Databases Equivalence 1

Status
Not open for further replies.

wizarddrummer

Programmer
May 6, 2004
17
0
0
US
Greetings,

I need help with filling in the blank. (if possible)

Over the years I've been around several types of databases
DBase IV, FoxBase, Unify, Sybase (long long ago), Access, and now MySQL.
Most of them except Sybase which was client server were simple stand alone
applications in that each database could be associated with a specific file.

example: sales.db2, info.dbf, cars.mdb, recipies.mdb, etc.

Once created if I wanted to a) replicate them I could simply copy them to
different machines or b) copy it remotely to another machine I could use
FTP to accomplish that task. As long as a similar environment existed on
the remote machine then a person could access the data.


What I want to know is can I go through the development process (designing a database, the PHP files to to access and populate the data etc.) locally and then move the whole shebang up to a remote machine on the internet that runs mysql?
[tt]
+----------------+----------------------+--------+
|Move database to| ftp from (exmpl. dir)| |
|another machine | C:\dbstuff\myDB.mdb | ?? |
|on the internet | to remote machine dir| |
+----------------+----------------------+--------+
[/tt]
Does MySQL create a "file" that contains the table relationships and data that can be copied to another machine that has the MySQL environment enabled? (assuming the versions are similar)

Many Thanks in advance,
wiz
 
Yes.

MySQL stores its data in the following structure

\\server\C\MySQL\Data
Each folder below that structure represents what MySQL thinks of as a separate database sales, info, cars, recipies etc. ( There is also a MySQL database at this same level that contains all of the security/permissions info etc. )

Within each database folder MySQL stores the table design and data information using THREE files per table
for table tblXyz you'll get tblxyz.frm containing the data and tblxyz.myd and tblxyz.myi containing the table design information.

All you need to do to Backup the whole show or to transfer the database to a new location is copy the entire structure from \data\ downwards.

Then at the new location you boot up MySQL and it finds all of the databases and tables just where it should.

( All the above path information is subject to change in the My.ini file - so you can tell MySQL to go look elsewhere if you want to. I actually have all MySQL running from the C drive on the server here - but the \data\.. .. structure is on the D drive ) - but don't let that cloud your understanding.


How you then tell your front end GUI that the database has moved is a matter of detail for the particular front end you are using.



'ope-that-'elps.





G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top