Forum Moderators: coopster

Message Too Old, No Replies

How to upload mysql databases

I am confused

         

Aberdeen

1:01 pm on Nov 3, 2004 (gmt 0)

10+ Year Member



I have created the mysql database and have been using it fine on my own machine using the Apache server. But now I want to upload the database to our hosts server, and I just don't know how to do it.

The folder of the database I want to upload is full of .frm .myd and .myi files. How do I upload this, and where do I upload it to. I normally but my access files in the DB folder, so I presume mysql is the same.

I thought I had set up the database using the HELM so the user and password will be acceptable, but I think it is not working as I don't know how to upload the mysql database correctly.

I read somewhere to download mysql front, and exported the database as a .sql file, but that did not seem to work. Am I on the right track?

Cheers For Any Help

randallxski

1:31 pm on Nov 3, 2004 (gmt 0)

10+ Year Member



I've had success in simply copying the data directory from one server to another. I'm not sure if there's a better method, but this works for me.

Aberdeen

1:41 pm on Nov 3, 2004 (gmt 0)

10+ Year Member



So do I copy the folder into the DB directory?

I the database was called F00 , would I just copy that F00 folder from the mysql/data/ to the DB folder on my server?

Cheers

dcrombie

2:19 pm on Nov 3, 2004 (gmt 0)



You can dump the db using:

mysqldump dbname > dbname.txt

and import on another machine using:

mysql dbname < dbname.txt

Aberdeen

2:44 pm on Nov 3, 2004 (gmt 0)

10+ Year Member



The servers we use are windows servers, and I can only set things up using HELM, so what should I be doing?

randallxski

1:46 pm on Nov 4, 2004 (gmt 0)

10+ Year Member



So do I copy the folder into the DB directory?
I the database was called F00 , would I just copy that F00 folder from the mysql/data/ to the DB folder on my server?

Yes. I just did that yesterday, pulling down live data to a test server. In my case I renamed the old data directory to data.old and copied the entire data directory to the mysql folder.

There may be better ways, such as the dump/import method. The copy method has worked several times for me.

Slade

1:56 pm on Nov 4, 2004 (gmt 0)

10+ Year Member



Check with your host to see if they can/will allow you (at least temporary) system access. Then you can use a program called Remote Desktop, available from mikeysoft, to connect to the server. You would then be able to run the shell commands from above from a cmd prompt.