![]() |
Ip of mysql server?
Im on shared hosting. I want to post to my mysql database on there from another server. How do i find out the mysql ip on my shared hosting(with cpanel)
Thanks |
Quote:
He can, thru WHM, add a permission for an outside IP. Then you have to do the same in Cpanel. |
well if you use localhost then it would be the ip of your server
|
Quote:
|
eh.. well in cpanel i have option to add outside ip
|
this is specifically for phatservers
|
Quote:
and on that server use the ip of your domains on the mysql server as mysql host. Make sure that the server you access the mysql server from is allowing TCP connections to port 3306 and allows related connections for replies on high ports |
Quote:
I mean if he uses localhost its more than likely the internet IP of his server |
Quote:
isn't. Localhost means you can access it only from the server itself and not remotely. same as mysql config variable skip-networking which prevents the server to accept ANY other connection to the mysql server EXCEPT for the server itself. |
Quote:
what he said is if he's using localhost to connect to mysql then mysql could be reached through the ip of the server since its not hosted on a remote server. |
Quote:
on another server....no? :helpme |
and if bind-address = 127.0.0.1 is in the my.cnf then using the ip on
a server to connect even from that same server still wouldn't work |
Quote:
he only pointed that the ip for mysql its the same with his server ip nothing about if it works or not. |
Quote:
|
Well i guess my next question is this, being that i most likeyly cant post remotely.
If you have a form on www.sitea.com but your mysql database is in www.siteb.com, how can you post from sitea.com to siteb.com You could put in html, post to www.siteb.com/postscript.php but then people could go to your html and see posting location. Anyway to hide this? basically how can i post to a script/database hosted on a remote location and have nobosdy know where im posting it. |
have a postscript on siteb that uses curl to post transparently to sitea
|
Quote:
the target address isn't shown if it's inside the php code instead of the html code. But frankly if you restrict the mysql server to accept connections from specific ip addresses only that's kinda irrelevant. as mysql would only accept connections from the whitelisted ips. I suggest making those restrictions with iptables (linux) or ipfw (freebsd) instead of using the mysql config to determine this or both. |
how do u use curl to post transparently?
target address isnt shown inside script but anyone can view source of html page and see where its posting to.. thats my problem |
Quote:
the script variant post script to self and have a function where upon post the result is send to mysqldb on siteA :2 cents: |
you can use curl also to post directly to the mysql db from siteB to siteA
there's a number of options you have with it. siteB:~#man curl :winkwink: |
"the script variant post script to self and have a function where upon post
the result is send to mysqldb on siteA" how do i do this? |
deos phatservers allow remote posting to mysql dbase
|
Quote:
be posted should go it self so the same script generates the form will also be the script where the info is being posted. the function that does the actual posting looks for variable POST when that one is set it takes the info and post it to another script on siteA that will insert the info into the mysql db. (this doesn't require siteA to be able to connect directly to mysql) If it allows to connect to mysql remotely you can post the info directly into the mysql db using a mysql query that uses siteA's ip as mysql host for that query. if you don't need this today email me what form fields you want and I'll email you back the code in a day or max 2 days. genius (at) servergenius dot com :thumbsup |
ah..thanks.. kinda confused about,
"the formpost script in the form tag post where you put the url where it should be posted should go it self so the same script generates the form will also be the script where the info is being posted. " |
| All times are GMT -7. The time now is 09:23 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123