469,267 Members | 971 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,267 developers. It's quick & easy.

Transferring a MySQL database from local PC onto an ISP server

aa
If I have an MySQL database on my local w2k, how do I transfer it onto my
ISP server?
The ISP gave me the name of an empty MySQL database they set up for me, the
username and the password with no further explanations.
I came here from ASP/Access where I was just uploading a mdb file into my
webspace.
But with MySQL there should be a different procedure, should it not?
Jul 17 '05 #1
7 2684
In article <41***********************@ptn-nntp-reader02.plus.net>,
"aa" <aa@virgin.net> wrote:
If I have an MySQL database on my local w2k, how do I transfer it onto my
ISP server?
The ISP gave me the name of an empty MySQL database they set up for me, the
username and the password with no further explanations.
I came here from ASP/Access where I was just uploading a mdb file into my
webspace.
But with MySQL there should be a different procedure, should it not?


Read the man page for mysqldump, which should be on your system if you
installed MySQL. And do some selected reading on MySQL from whatever
books work for you. I like the O'Reilly books and articles:

http://www.oreilly.com/catalog/msql2/index.html
http://tinyurl.com/5jyu3

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 17 '05 #2
.oO(aa)
If I have an MySQL database on my local w2k, how do I transfer it onto my
ISP server?


Assuming you have shell-access to the server:

1) On your local machine, command line:

mysqldump -uUsername -pPassword Database > backup.sql

2) Upload the file backup.sql.

3) On the remote machine, command line:

mysql -uUsername -pPassword Database < backup.sql

Micha
Jul 17 '05 #3
aa
> 3) On the remote machine, command line:
mysql -uUsername -pPassword Database < backup.sql


How do I do that on my ISP's remote machine?
Jul 17 '05 #4
.oO(aa)
3) On the remote machine, command line:
mysql -uUsername -pPassword Database < backup.sql


How do I do that on my ISP's remote machine?


You need a shell account on that server.

If you're not able to login to the server using a secure shell (SSH) for
example you have to find another way. You could use phpMyAdmin or set up
a simple script that executes the command on the server.

XCIV. Program Execution Functions
http://www.php.net/manual/en/ref.exec.php

Micha
Jul 17 '05 #5
aa
I made some search.
If you mean that on my local machine from the command line I enter
mysql -h name_of_the_remote_host -u my_username -p

then it indeed asks for a pw, which means that it recognised the server
name. Howver after I ebter the pw, an error 2003 is returned:
Can't connect to MySQL server on name_of_the_remote_host (10060)

What should I do about it?
Jul 17 '05 #6
.oO(aa)
I made some search.
If you mean that on my local machine from the command line I enter
mysql -h name_of_the_remote_host -u my_username -p

then it indeed asks for a pw, which means that it recognised the server
name. Howver after I ebter the pw, an error 2003 is returned:
Can't connect to MySQL server on name_of_the_remote_host (10060)
That's how it's supposed to be. A database server on a public host
should not be accessible from remote machines.
What should I do about it?


First question: Are you able to login to the remote machine using SSH or
PuTTY or something like that? If unsure check with your host, maybe they
have a FAQ section.

Micha
Jul 17 '05 #7
aa
> First question: Are you able to login to the remote machine using SSH or
PuTTY or something like that?


Never heard of PuTTY or SSH - will check and revert
Jul 17 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Abby | last post: by
reply views Thread by Andrew Keating | last post: by
reply views Thread by Mike Chirico | last post: by
2 posts views Thread by balavignesh | last post: by
4 posts views Thread by nurcan.kurtoglu | last post: by
2 posts views Thread by garther | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.