Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Connect to MySQL database from another host.

    I am trying to connect to MySQL database at on host (DBhost) from another host (PROGRAMhost).

    While I try to connect to the database at DBhost from DBhost itself the next is working fine for me:
    mysql_connect("localhost","dbname","dbpassword")

    Now I am trying to find out what to use instead of localhost? I tried to replace localhost with host's url : port (I tried number of ports) but this is not working (even when I am connecting from DBhost itself). How can I find out what is the proper value to use instead of localhost?

  • #2
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,092
    Thanks
    2
    Thanked 23 Times in 23 Posts
    I assume that you have permission to be able to logon to one host's database from the other, so why not just ask them how to do it? An even bigger question would be why you're wanting to do this in the first place. Are you trying to port a database from one server to another? If so, and both hosts use cPanel, you can use that to do the database move. If one or both do not use cPanel, there still might be an easier way to do this. Again, check with the appropriate host to find out.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  • #3
    New to the CF scene
    Join Date
    Jul 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, both hosts are mine but that is what my client wants - to separate (physically) the information from the processing. I don't really like this as well.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •