Database password related issues in PHP scripts

Source: Internet
Author: User
Database password problems in PHP scripts
PHP If you have database operations, such as MySQL,

In the connection statement, is it only, and can only be entered with a plaintext database password? In this case, the person who has permission to see the script, is not the database password can know?
In that case, like the banking system, online shopping, the security of their database-connected scripts, what is the special place, how to keep the server in the safe? )。

I do not know whether I asked is very small white, but I do not know. Is there an implicit input method?

So, the problem is that you have permission to see the script, so what is his incompetent authority?

Banking system, most of the online shopping is using is much more secure than PHP. In addition, the database is basically not MySQL.

In contrast, passwords are more secure to write directly in the configuration file. Because if the server permissions are safe enough, others can't see your MySQL password. Even if your source is leaked, we can configure MySQL so that external HTTP or socket access is not available, which enhances security. Think again, if you do not specify the MySQL password, difficult to each data query, let the user enter the password once? Do you still call the code?
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.