What is the best way to keep your MySQL credentials private in PHP?

前端 未结 4 560
孤独总比滥情好
孤独总比滥情好 2021-01-25 18:37

When it comes to programming your web application in php, what is the most efficient way to prevent your MySQL information from being disclosed or discovered by another person (

4条回答
  •  时光取名叫无心
    2021-01-25 19:08

    Another thing you can do (should your credentials be compromised) is to make sure that the mysql user you set up for tasks which PHP will be using is barred from making DROP statements and maybe even DELETE statements if you can structure your data so.

    Give that user the minimum level of access to other databases possible, probably only the one that holds that users data.

提交回复
热议问题