Demonic Posted December 21, 2006 Share Posted December 21, 2006 Alright when connecting to a sql data how do you find the IP used to access data? Quote Link to comment https://forums.phpfreaks.com/topic/31525-mysql_connectipunpassword-quick-question/ Share on other sites More sharing options...
HuggieBear Posted December 21, 2006 Share Posted December 21, 2006 It doesn't have to be an IP address, it could be a hostname.To find the IP address you could ping the hostname and the IP address will be returned, but this isn't really a PHP issue.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/31525-mysql_connectipunpassword-quick-question/#findComment-146030 Share on other sites More sharing options...
craygo Posted December 21, 2006 Share Posted December 21, 2006 you have to contact your host and ask for the host. If you have cpanel with your host you can click on the mysql databases then look at the access and it should be in there I know mine is called "mysqlremote" not "localhost".Ray Quote Link to comment https://forums.phpfreaks.com/topic/31525-mysql_connectipunpassword-quick-question/#findComment-146031 Share on other sites More sharing options...
Demonic Posted December 21, 2006 Author Share Posted December 21, 2006 Thanks. Whats the other options in connecting to server? Quote Link to comment https://forums.phpfreaks.com/topic/31525-mysql_connectipunpassword-quick-question/#findComment-146046 Share on other sites More sharing options...
craygo Posted December 21, 2006 Share Posted December 21, 2006 There is no other option. You have to know where the mysql server is in order to connect. What hosting company are you using??Ray Quote Link to comment https://forums.phpfreaks.com/topic/31525-mysql_connectipunpassword-quick-question/#findComment-146049 Share on other sites More sharing options...
Demonic Posted December 21, 2006 Author Share Posted December 21, 2006 I'm using mb4f.info cpanel hosting.Im in the acp it says "localhost"i tried just putting the domain in the part and it said:[quote]Host 'mirage.ahplace.com' is not allowed to connect to this MySQL server in /home/*****/public_html/*****/teztport.php on line 4[/quote]when i tried access it from another host.[code]<?php mysql_connect("www.MYSITE.com","nemo_testport","*******"); mysql_select_db("nemo_testport"); $test = mysql_query("SELECT * FROM test ORDER BY id DESC"); while($thiz = mysql_fetch_array($test)){ echo $thiz['id']." : ".$thiz['keyz']."<br />"; }?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/31525-mysql_connectipunpassword-quick-question/#findComment-146054 Share on other sites More sharing options...
craygo Posted December 21, 2006 Share Posted December 21, 2006 If it is on the same box it should bemysql_connect("localhost","nemo_testport","*******");anything other than that you have to add to the host section in the cpanelRay Quote Link to comment https://forums.phpfreaks.com/topic/31525-mysql_connectipunpassword-quick-question/#findComment-146068 Share on other sites More sharing options...
Demonic Posted December 21, 2006 Author Share Posted December 21, 2006 Dang. So there isn't a easy way of getting information from my Database.Because I'm still trying to find out how to make a licence manager. Quote Link to comment https://forums.phpfreaks.com/topic/31525-mysql_connectipunpassword-quick-question/#findComment-146080 Share on other sites More sharing options...
Demonic Posted December 22, 2006 Author Share Posted December 22, 2006 bump Quote Link to comment https://forums.phpfreaks.com/topic/31525-mysql_connectipunpassword-quick-question/#findComment-146204 Share on other sites More sharing options...
trq Posted December 22, 2006 Share Posted December 22, 2006 [quote]Dang. So there isn't a easy way of getting information from my Database.[/quote]No. You need to give each domain trying to connect permissions to do so. Quote Link to comment https://forums.phpfreaks.com/topic/31525-mysql_connectipunpassword-quick-question/#findComment-146208 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.