NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
connecting to remote mysql


Joined: 22 May 2004
Posts: 76
Reply with quote
I have mysql running on a different server than my website. I can connect to mysql only from the server that my website is on. How can I setup nusphere phped to connect to that mysql server?

Some programs offer a way to connect by uploading a script to the server that the site is on and letting it connect to the mysql db and then returning access to the db back to the program. wondering if phped can do that, or is there anyway to connect phped to my mysql in this scenario?
View user's profileFind all posts by jphilapySend private message


Joined: 11 Apr 2010
Posts: 90
Location: Prague, Czech Republic
Reply with quote
You have to enable remote connection in your SQL server, have the SQL server's remote address in allowed SQL hosts, and have appropriate port opened (standard is 3306 for MySQL). Try to contact your hosting provider for more information, but many hostings have this option disabled for security reasons. If you are not server administrator, it might not be possible to configure everything yourself and even if you are, it is a bit complicated. Try google "mysql allow remote host", there are plenty of examples, how to do it, however at least basic server administration knowledge is required.
When everything is configured properly, you can access the remote SQL server the same way as your local server, but instead of "localhost" in SQL connection server name you use server's remote address (something like "mysqlremoteserver.com").
View user's profileFind all posts by fibizaSend private message
http tunneling


Joined: 22 May 2004
Posts: 76
Reply with quote
fibiza wrote:
You have to enable remote connection in your SQL server, have the SQL server's remote address in allowed SQL hosts, and have appropriate port opened (standard is 3306 for MySQL). Try to contact your hosting provider for more information, but many hostings have this option disabled for security reasons. If you are not server administrator, it might not be possible to configure everything yourself and even if you are, it is a bit complicated. Try google "mysql allow remote host", there are plenty of examples, how to do it, however at least basic server administration knowledge is required.
When everything is configured properly, you can access the remote SQL server the same way as your local server, but instead of "localhost" in SQL connection server name you use server's remote address (something like "mysqlremoteserver.com").


Thx. I know all that stuff. But now to what I actually asked about. Are you saying you don't know the answer? Or are you saying it is not possible? I need to know if there is away to tunnel in, without removing security from mysql. There are other programs that offer that. But would like to know if phped does.


Jeff
View user's profileFind all posts by jphilapySend private message


Joined: 11 Apr 2010
Posts: 90
Location: Prague, Czech Republic
Reply with quote
I know no way of "tunnelling in" without server-side support and I do not think it is possible, because it would be major security violation. The only other "standard" option would be accessing SQL "locally" over SSH, but for this you also need server-side SSH support - this one is more likely allowed by hostings. Just google "access your mysql server remotely over ssh" for answers on this topic (should be the first googled link). In phpEd's site there is a SSH how-to here: http://www.nusphere.com/products/php_editor_ssh.htm.

Theoretically speaking, it could be also possible to write a server-side connector to SQL in PHP and connect through it, but this would be a highly custom solution and I have no experience with this option.
View user's profileFind all posts by fibizaSend private message
connecting to remote mysql
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic