1

I'm developing an online application that will have many outside users. As for now my connection method is to host a centralized database for all users, while they connect from their own server files.

Method:
PHP Connection File (hosted on their server; file provided by me) >> Connects to my MySQL Database

Now obviously I need to provide my database user and pw info, but I know that questions security.

So to my point, how would I provide database access to outside users(different servers) without giving up security.

Or if someone has a better method I'd love to hear it. Thanks!

2 Answers 2

3

Create an API in php, sort of webservice with an interface that you define and host this API on your server.

Each user (script that runs on users server and uses your API) needs a personal API key or access code they need to register to the webservice.

Take a look at well known API's like Google maps or something similar. Oh even stackoverflow has one

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

1 Comment

This. If you create your own API, you can control exactly what parts of the database users have access to, and their permission levels.
-2

Create a signup form for users and store their own UserID and Password in a table on your site. Then create a PHP interface for them to upload their files. That way, you need only validate thier own UserID and Password through a HTML/PHP form to allow them to sign in, and your MySQL creds stay safely hidden.

1 Comment

My original idea was to allow them to upload their files to our server, but have decided it would be better for their files to be elsewhere while we allowed them to pull data from one location.

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.