a better approach than storing mysql password in plain text in config file?

前端 未结 8 2048
说谎
说谎 2020-11-29 00:26

It\'s always bothered me that many PHP programs require the user to store the mysql password in plain text (in a string or constant) in a configuration file in the applicati

8条回答
  •  抹茶落季
    2020-11-29 00:48

    Besides storing this sensitive data properly, you should also create a separate MySQL user that has only the required privileges and restrict the access to the database/tables/views it needs to have access to. And since the database server is often run on the same machine as the web server, do also restrict the access to local accesses. So don’t use the user with root privileges if it just needs to read data from a single database/table.

提交回复
热议问题