|
Posted by Gordon Burditt on 10/13/07 19:01
>I have my own database on a server and the same database on local.
Does that mean *TWO DIFFERENT MACHINES*?
Many hosts do not permit database access from arbitrary hosts
for "security reasons".
>I want to copy all my database from the main server to my local host
>(I execute this code from my PC and not my main server)
>
>$id_link_ref = mysql_connect('localhost','database_name','password');
>$id_link_local = mysql_connect('localhost','root','password');
If you are trying to open a connection to two different machines,
shouldn't one of the hostnames NOT be 'localhost'? Also, the second
argument to mysql_connect is a username, NOT a database name,
although they might coincidentally be the same.
>it doesn't work :(
How do you know it failed?
>Why ? What is the problem ?
What was the error message?
Navigation:
[Reply to this message]
|