![]() |
Copy one mysql db to another server - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Copy one mysql db to another server (/showthread.php?tid=3260) |
Copy one mysql db to another server - El Forum - 09-20-2007 [eluser]johnwbaxter[/eluser] This might seem like a silly question to some. If i want to copy a mysql database from my local machine to a webserver, can i just copy the folder that the .frm and .myd and .myi etc files are in to my webserver? If i can, that would be great! Copy one mysql db to another server - El Forum - 09-20-2007 [eluser]Michael Wales[/eluser] Run phpMyAdmin, Export to a SQL file, then go onto the server's copy of phpMyAdmin and Import that SQL file. Copy one mysql db to another server - El Forum - 09-20-2007 [eluser]johnwbaxter[/eluser] I should have worded my question differently! What i want to know is can it be done by copying the files? I know how to use mysql command line or navicat or whatever, but i want to know if i can copy a whole database by copying the mysql files. Copy one mysql db to another server - El Forum - 09-20-2007 [eluser]esra[/eluser] In Windows and in a localhost development environment, I know this is possible if the two MySQL servers are the same version by just dragging and dropping directories on the same machine or through a shared network directory. I would imagine that you could archive the directory and move it to a remote server using that basic approach. I sometimes make database backups quickly using this approach just before making major schema changes. It might also work if there are minor MySQL version differences. However, I always use Michael's phpMyAdmin approach when transferring data to production servers. Copy one mysql db to another server - El Forum - 09-20-2007 [eluser]johnwbaxter[/eluser] Excellent! That is the answer i was hoping for. Thank you! |