0

i have a linux server that i am used to host websites (mysql installed and working properly on this server)

now what im trying to do is develop a java POS system i need to use mysql as database engine and planning to use my linux web server as a database server

problem is i cant use static ip for client pc's but in order to access mysql instance i have to allow client ip address first

I found these solutions on web :

  1. Use wildcard % and allow all the IP addresses in the world - i think this as a bad idea
  2. Also we can find clients ISP's IP range and allow that range - this is ok but some of ISP's in my county refused to provide their IP range and i think their should be better way than this

Question : I'm just wondering what methods are used in the software industry to implement web based systems and i need secure,reliable solution for this

3
  • 1
    Build an API rather than exposing the raw SQL service to the world. Commented Jan 15, 2015 at 16:29
  • what are the technologies that i can use to build API ? (i mean programming languages ) Commented Jan 15, 2015 at 16:31
  • @nicoleino Any programming language. Commented Jan 15, 2015 at 16:36

2 Answers 2

1

you can make it in php or java or in python it will not affect your client app, your client app will just send http request with authentication details like http://host.com/?username=me&password=sec&action=getUserList

And your host server will return a response in JSON or XML format as per his request Like:

<user>
<name>vivek</name>
<email>[email protected]</eail>
</user>

then your client app will parse this response and can use that. , or google about Restful APIs you will see lots of tutorials on all technologies, Or use this service apiary.io

Sign up to request clarification or add additional context in comments.

4 Comments

thanks for your reply . I'm just wondering what methods are used in the software industry ? do you think this as industrial solution
Yes, you can see that on indeed.com apis , currently RESTFUL api is the solution, android app ios app receives data from server through restfull api, you can create restful apis using php or java or using python
based on your example will it add clients ip address to the white list or will it return accessible URL?
there is nothing related to IP, you will authorize client by providing authentication on each request (or dont use any authorization) .(URL) then host have to return the string as response. for example indeed-indeed.p.mashape.com/apisearch , it is returning JSON response that you havnt provided authentication key, so by this way your client app and talk to your server host.
1

Given the restrictions you have in your situation, you'll need to go with solution 1. Just ensure that you have strong passwords.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.