Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 07-10-2007, 08:50 AM   #1
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
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
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 08:58 AM   #2
directfiesta
Too lazy to set a custom title
 
directfiesta's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: Montreal, Quebec
Posts: 29,796
Quote:
Originally Posted by xxweekxx View Post
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.
__________________
I know that Asspimple is stoopid ... As he says, it is a FACT !

But I can't figure out how he can breathe or type , at the same time ....
directfiesta is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 08:58 AM   #3
ztik
Confirmed User
 
ztik's Avatar
 
Industry Role:
Join Date: Aug 2001
Location: Nomad
Posts: 5,196
well if you use localhost then it would be the ip of your server
__________________
.
ztik is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:02 AM   #4
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
Quote:
Originally Posted by ztik View Post
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
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:03 AM   #5
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
eh.. well in cpanel i have option to add outside ip
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:04 AM   #6
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
this is specifically for phatservers
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:05 AM   #7
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
Quote:
Originally Posted by xxweekxx View Post
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
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |

Last edited by ServerGenius; 07-10-2007 at 09:06 AM..
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:08 AM   #8
ztik
Confirmed User
 
ztik's Avatar
 
Industry Role:
Join Date: Aug 2001
Location: Nomad
Posts: 5,196
Quote:
Originally Posted by ServerGenius View Post
wrong localhost is 127.0.0.1 NOT the internet routed ips on your server
Thats not what I meant

I mean if he uses localhost its more than likely the internet IP of his server
__________________
.
ztik is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:11 AM   #9
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
Quote:
Originally Posted by ztik View Post
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.
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:17 AM   #10
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
Quote:
Originally Posted by ServerGenius View Post
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.
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:18 AM   #11
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
Quote:
Originally Posted by darksoul View Post
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?

__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:21 AM   #12
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
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
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:32 AM   #13
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
Quote:
Originally Posted by ServerGenius View Post
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.
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:36 AM   #14
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
Quote:
Originally Posted by darksoul View Post
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.....
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:38 AM   #15
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
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.
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:44 AM   #16
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
have a postscript on siteb that uses curl to post transparently to sitea
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 09:45 AM   #17
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
Quote:
Originally Posted by xxweekxx View Post
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.
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 10:02 AM   #18
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
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
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 10:04 AM   #19
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
Quote:
Originally Posted by xxweekxx View Post
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

__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 10:17 AM   #20
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
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
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 10:25 AM   #21
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
"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?
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 10:27 AM   #22
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
deos phatservers allow remote posting to mysql dbase
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-10-2007, 11:33 AM   #23
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
Quote:
Originally Posted by xxweekxx View Post
"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
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |

Last edited by ServerGenius; 07-10-2007 at 11:34 AM..
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-11-2007, 06:19 PM   #24
xxweekxx
Confirmed User
 
Join Date: Oct 2002
Posts: 6,780
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.
"
__________________
_________________
I am the best
xxweekxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.