GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Ip of mysql server? (https://gfy.com/showthread.php?t=750183)

xxweekxx 07-10-2007 08:50 AM

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

directfiesta 07-10-2007 08:58 AM

Quote:

Originally Posted by xxweekxx (Post 12732984)
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

I doubt that the host allows to access the db from outside... Normally, it is " localhost" for that reason.

He can, thru WHM, add a permission for an outside IP. Then you have to do the same in Cpanel.

ztik 07-10-2007 08:58 AM

well if you use localhost then it would be the ip of your server

ServerGenius 07-10-2007 09:02 AM

Quote:

Originally Posted by ztik (Post 12733043)
well if you use localhost then it would be the ip of your server

wrong localhost is 127.0.0.1 NOT the internet routed ips on your server :2 cents:

xxweekxx 07-10-2007 09:03 AM

eh.. well in cpanel i have option to add outside ip

xxweekxx 07-10-2007 09:04 AM

this is specifically for phatservers

ServerGenius 07-10-2007 09:05 AM

Quote:

Originally Posted by xxweekxx (Post 12733086)
eh.. well in cpanel i have option to add outside ip

then add the ip from the server you want to use to access the mysql db.
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

ztik 07-10-2007 09:08 AM

Quote:

Originally Posted by ServerGenius (Post 12733079)
wrong localhost is 127.0.0.1 NOT the internet routed ips on your server :2 cents:

Thats not what I meant

I mean if he uses localhost its more than likely the internet IP of his server

ServerGenius 07-10-2007 09:11 AM

Quote:

Originally Posted by ztik (Post 12733111)
Thats not what I meant

I mean if he uses localhost its more than likely the internet IP of his server

No coz the other ips on a server are internet accessible ips and localhost
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.

darksoul 07-10-2007 09:17 AM

Quote:

Originally Posted by ServerGenius (Post 12733128)
No coz the other ips on a server are internet accessible ips and localhost
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.

you're too quick to jump the gun

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.

ServerGenius 07-10-2007 09:18 AM

Quote:

Originally Posted by darksoul (Post 12733177)
you're too quick to jump the gun

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.

right....but the question was about a remote server accessing the mysql dbs
on another server....no?

:helpme

ServerGenius 07-10-2007 09:21 AM

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

darksoul 07-10-2007 09:32 AM

Quote:

Originally Posted by ServerGenius (Post 12733219)
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

I don't think he said otherwise
he only pointed that the ip for mysql its the same with his server ip
nothing about if it works or not.

ServerGenius 07-10-2007 09:36 AM

Quote:

Originally Posted by darksoul (Post 12733307)
I don't think he said otherwise
he only pointed that the ip for mysql its the same with his server ip
nothing about if it works or not.

my bad then....I understood it in relation to the initial question.....:thumbsup

xxweekxx 07-10-2007 09:38 AM

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.

darksoul 07-10-2007 09:44 AM

have a postscript on siteb that uses curl to post transparently to sitea

ServerGenius 07-10-2007 09:45 AM

Quote:

Originally Posted by xxweekxx (Post 12733345)
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 nobody know where im posting it.


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.

xxweekxx 07-10-2007 10:02 AM

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

ServerGenius 07-10-2007 10:04 AM

Quote:

Originally Posted by xxweekxx (Post 12733515)
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

storing the post info on siteB and retrieve that file with curl from siteA through a cronjob

the script variant post script to self and have a function where upon post
the result is send to mysqldb on siteA

:2 cents:

ServerGenius 07-10-2007 10:17 AM

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:

xxweekxx 07-10-2007 10:25 AM

"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?

xxweekxx 07-10-2007 10:27 AM

deos phatservers allow remote posting to mysql dbase

ServerGenius 07-10-2007 11:33 AM

Quote:

Originally Posted by xxweekxx (Post 12733702)
"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?

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.

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

xxweekxx 07-11-2007 06:19 PM

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