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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving database

Status
Not open for further replies.

ants211

Technical User
Feb 22, 2002
15
GB
Hi, I have recently began to learn PHP with MySQL. I am running test scripts with Apache web server at home. I am also running mysql web server on my home machine. Is it a difficult or cumbersome process to move the database to a web server (say paid hosting) when I wish to? i.e. will the paths in my PHP scripts need to be changed etc?

Thanks.
 
My advise to you is always use relative paths instead of absolute ones. And have the connect in an external file where you can change the paramters when you send the package to the ISP easily.

Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
No, it wont be difficult so long as you do as Anikin suggests and use relative pathing and definitely use include files for all of your connection processing.

Moving a database is very easy, especially if you have phpMyAdmin. If not, you can execute:
mysqldump --opt database > backup-file.sql

to create a backup along with structure information. You can read this back into MySQL with:
mysql database < backup-file.sql

I hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top