PDA

View Full Version : Moving data from one databse to another!


andr345
06-27-06, 04:31 PM
Hey y'all!
I just finished a php website I have been working on for quite a while and I am almost ready to host my website. I have though this problem. During the web-site creation process all my testing and such were made on a local database. With the use of a programm called EasyPHP I made my own simple computer a PHP/MySQL host. I have quite a lot of data in my local database which I want to copy to the database I will have in my new web host. I am using phpMyAdmin. Could you pls explain me the process on how I can move all the tables and rows included in them to my new database.
Thanks!

Nico
06-27-06, 04:34 PM
Moved to database.

koncept
06-27-06, 05:09 PM
what program do you use to manage your mysql server?? what you will need to do is export the data or do a sql dump and then load that in on the server. I can probaly give you more detailed instructions if i know what program you are using.

andr345
06-27-06, 07:06 PM
I am using phpMyAdmin which, if I am not mistaken has an Export option included in its index site. Is that the one I should be using?

andr345
06-27-06, 07:08 PM
Yes. It's that one, but could you pls explain to me what I should do exactly so that during the export all the rows will be exported as well. It is a bit confusing.
Thanks!

koncept
06-27-06, 07:28 PM
ok on that export screen in the left hand side choose the database.
-keep it as sql

sql options
-add drop database
-structure (add drop, if not exist, autoincrement, backquote)
-data (complete, extended inserts, max length 50000, use hex for binary, type: insert)

then click go, it will produce a sql script that you should copy into a notepad file just to save it that will contain the structure and data. then goto import and browse to that notepad file you just made and you should be able to load it in

andr345
06-29-06, 09:43 AM
Oh.That seems quite simple enough. When I will start moving the data I will let you know. Thanks a lot koncept. You have helped me a great deal! ;)