Jump to content

Securing Mysql Data So Script Can Only Read It


dzhax

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 comment
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 comment
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 comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...