thebigman Posted February 13, 2010 Share Posted February 13, 2010 I wonder if someone can help. I am trying to connect to my localhost host from my other database hosting company. My localhost is in cpanel. I am trying to connect using iivision power board. I have tried a few thing but i'm not a the level yet to fully understand what to do. If someone could explain in a simple way how to go about it it would be great thanks. Thanks again Quote Link to comment https://forums.phpfreaks.com/topic/191954-connecting-to-local-host-externaly/ Share on other sites More sharing options...
trq Posted February 13, 2010 Share Posted February 13, 2010 You need to set permissions on the database server in question that will allow a remote server to connect to it. eg; grant all privileges on 'databasename' to 'username'@'remotehost' identified by 'password'; Quote Link to comment https://forums.phpfreaks.com/topic/191954-connecting-to-local-host-externaly/#findComment-1011748 Share on other sites More sharing options...
thebigman Posted February 13, 2010 Author Share Posted February 13, 2010 Where abouts would you type this in. the database that i am trying to connect to is on the localhost one in cpanel. If you had time i could give you username etc to get into cpanel? Sorry Quote Link to comment https://forums.phpfreaks.com/topic/191954-connecting-to-local-host-externaly/#findComment-1011757 Share on other sites More sharing options...
jskywalker Posted February 13, 2010 Share Posted February 13, 2010 "localhost" referes to LOCAL host if you want to contact another database/system, than you need to know the name of that system. Computer normally identify the system you are working on as "localhost", and give it the ip-address "127.0.0.1" So, if you try to go to "127.0.0.1" you always see "localhost". This is done through a system called DNS. To make contact to another system than localhost, you need to know its name, or its ip-address Quote Link to comment https://forums.phpfreaks.com/topic/191954-connecting-to-local-host-externaly/#findComment-1011762 Share on other sites More sharing options...
thebigman Posted February 13, 2010 Author Share Posted February 13, 2010 I know the database server address of my other database. So does that make the 127.0.0.1 as the address of the local host. My application asks for a server address. Sorry for the lack of knowledge. Quote Link to comment https://forums.phpfreaks.com/topic/191954-connecting-to-local-host-externaly/#findComment-1011768 Share on other sites More sharing options...
jskywalker Posted February 13, 2010 Share Posted February 13, 2010 Please try to explain your problem without the word 'localhost'. Its very unclear to /me what system you are referring to when you are talking about 'localhost' Try to call your system at home something like: testserver And the system at your provider something like: productionserver Quote Link to comment https://forums.phpfreaks.com/topic/191954-connecting-to-local-host-externaly/#findComment-1011769 Share on other sites More sharing options...
trq Posted February 13, 2010 Share Posted February 13, 2010 If you have a database server on hostA and a site on hostB that needs to connect to it, you need to configure the database server on hostA to allow connections from hostB, then configure hostB to connect to hostA. Localhost and 127.0.0.1 only ever refer to the machine the servers are running on. Its like home or self. Its a bit like me. From where I stand me means myself, but from your point of view me refers to you. Quote Link to comment https://forums.phpfreaks.com/topic/191954-connecting-to-local-host-externaly/#findComment-1011770 Share on other sites More sharing options...
thebigman Posted February 13, 2010 Author Share Posted February 13, 2010 OK i have a forum on server a and a forum on server b both the same forums but i am trying to import from a to b server a has the localhost Sorry so how does that go then arghhhh Quote Link to comment https://forums.phpfreaks.com/topic/191954-connecting-to-local-host-externaly/#findComment-1011780 Share on other sites More sharing options...
jskywalker Posted February 13, 2010 Share Posted February 13, 2010 every server is 'localhost' to itsellf... Quote Link to comment https://forums.phpfreaks.com/topic/191954-connecting-to-local-host-externaly/#findComment-1011782 Share on other sites More sharing options...
trq Posted February 13, 2010 Share Posted February 13, 2010 OK i have a forum on server a and a forum on server b both the same forums but i am trying to import from a to b server a has the localhost Sorry so how does that go then arghhhh Ive already explained what you need to do. What part don't you understand? Quote Link to comment https://forums.phpfreaks.com/topic/191954-connecting-to-local-host-externaly/#findComment-1011941 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.