Jump to content

Securing Mysql Data So Script Can Only Read It


Recommended Posts

I am making a script and i want to host the mysql database login information on my webserver somewhere so no one can hack it, but the script when ran on other servers still need to access it to read the login details.So what I am asking is, is there a way to make it that only scripts can read a file? I dont want people to just browse to the file and read the login information.Or is there a better way to do this.The other reason why I want to keep it on my websserver is if the login details change, then i will not have to send an update to everyone.

Link to post
Share on other sites
You could always encrypt the data. There's a lot to say about hosting a publicly-accessible database and also hosting the login credentials, but if you're OK with that then go for it.
what do you mean by there is a lot to say?
Link to post
Share on other sites

place your login credentials in a config file with a php extension.locate the config.php file outside of your web root folder.use an include statement to have the config.php file added to your script.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...