Forum Moderators: coopster

Message Too Old, No Replies

How to upload local DB

Where is it?

         

neophyte

10:35 am on Apr 23, 2005 (gmt 0)

10+ Year Member



Hello all - please bear with me on this one:

I've created my first dynamic (.php) site for a client. For this site, I've created a mysql database on my local development machine for query testing purposes. I'm able to connect and query this database without any problem.

Now, here's the thing: When I'm ready to take this site live, how do I go about uploading the DATABASE from my local box to my client's server space?

I mean, I can't find the database on my local machine, even though it is obviously there...somewhere. This is kind of like looking for a frog when you've never seen one before.

I've looked around in the apache folder (on my local machine) and can't find any mysql anything named "danielik" - which is what I've named the database.

There is a folder named "_mmServerScripts" which contains 2 files: MMHTTPDB.php, and mysql.php. Is this the database?

I'm sure you folks are gonna just say "oh, yeah, just find the folder that says 'something' and upload that into the 'something folder' on the live site.

Or, atleast that's what I HOPE someone will say!

Any and all assistance would be grealty appreciated. Anytime anyone of you are in the Philippines, the San Miguel's on me.

Neophyte

dcrombie

11:40 am on Apr 23, 2005 (gmt 0)



You need to "dump" the db to a text file. On *ix you'd type:

mysqldump dbname > db.dump

Or you could use phpMyAdmin to do it.

To import, type:

mysql dbname < db.dump

or again, use phpMyAdmin.

;)

neophyte

12:04 pm on Apr 23, 2005 (gmt 0)

10+ Year Member



dcrombe -

Your response gives me hope and not a small bit of relief. Three follow-on questions:

Question 1:

will the mysqldump create seperate text files for each of my tables, or just one text file containing all table and entry information?

Question 2:

Theres an option to install phpMyAdmin within the host site. If I install on the live server, can I then use it to import the text file to the live site FROM my local machine?

Question 3:

Is the "dump" text file just a duplication of the testing database? It won't wipe out the test database, will it?

Thanks so much for getting back to me so quickly.

henry0

12:31 pm on Apr 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



will the mysqldump create seperate text files for each of my tables, or just one text file containing all table and entry information?

It will create a full backup of your existing, but post its first line; depending on how it will dump info it might sart by “create DB etc..” and your host might require that the DB should be firstly created or it has already been created as part of your server setup. Anyway no big deal

Theres an option to install phpMyAdmin within the host site. If I install on the live server, can I then use it to import the text file to the live site FROM my local machine?

Yes install PHPMyAdmin, it will tremendously help you in understanding what’s happening, if you have doubts post here most members know very well about PHPMyAdmin; to import your local file you will click on SQL, paste in the window your dump click go and that’s it to it!

Is the "dump" text file just a duplication of the testing database? It won't wipe out the test database, will it?

Do not worry about deleting your existing it can only be achieved with the “Drop” command further more you will always be asked to confirm an action.

neophyte

3:38 pm on Apr 23, 2005 (gmt 0)

10+ Year Member



Big THANKS! to both dcrombe and HenryO.

All suggestions worked. Dumped the DB, imported same into phpMyAdmin, loaded the .php page on the site and POOF! It worked.

Thanks to you both - and to WebmasterWorld in general - I've put away the razor blades

The San Miguels are waiting.

Neophyte

henry0

4:34 pm on Apr 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're welcome :)