Welcome Guest, Not a member yet? Register   Sign In
Copy one mysql db to another server
#1

[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!
#2

[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.
#3

[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.
#4

[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.
#5

[eluser]johnwbaxter[/eluser]
Excellent! That is the answer i was hoping for.

Thank you!




Theme © iAndrew 2016 - Forum software by © MyBB