PHP/mySQL database backup

They have: 218 posts

Joined: Apr 2001

Hi there,

How can I record/copy an entire database structure, and then 'paste' all the tables/data to another database?

Thanks,

TonyMontana
http://www.electricmountain.com

Busy's picture

He has: 6,151 posts

Joined: May 2001

do you have phpmyadmin or anything?

They have: 218 posts

Joined: Apr 2001

Yes, I have phpmyadmin.

Busy's picture

He has: 6,151 posts

Joined: May 2001

you can do a sql dump of structure and data,
depending on the version of phpmyadmin you have, there should be an option at the bottom of the page (when you click on the database name) giving options to view dump etc, or will be an export option at top.
select structure and data and send as file, which will prompt you to save it somewhere on your pc, upload that file and import it into your newly name database and your back online again and the only info you will loose will be from the time you save it, to the time you import it.

They have: 218 posts

Joined: Apr 2001

"upload that file and import it into your newly name database"

Busy, I've saved the 'structure and data' to a zip file; which button(s) do I use to import the file into phpmyadmin?

Thanks,

TM

edit: got it working. I tried to import the file before unzipping it. Thanks Busy.

Busy's picture

He has: 6,151 posts

Joined: May 2001

Glad I could help, It's hard with so many versions of phpmyadmin out there, they keep changing things around so is hard to describe what/where to do things.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.