Php script database password-php Tutorial

Source: Internet
Author: User
Php script database password problems if php has database operations, such as mysql, in the connection statement, can only, and can only enter the database password with a clear code? In this case, if you have the permission to view the script, do you know the database password? In that case, for example, banking systems, online shopping, and the security of their database connection scripts, are there any special points, and how to keep them confidential (, lock the server in the safe ?). I don't know if I am very white, but I don't know about the database password in the php script.
If php has database operations, such as mysql,

In the connection statement, can I only enter the database password with an explicit code? In this case, if you have the permission to view the script, do you know the database password?
In that case, for example, banking systems, online shopping, and the security of their database connection scripts, are there any special points, and how to keep them confidential (, lock the server in the safe ?).


I don't know if I am very white, but I don't know. Is there any implicit input method?



------ Solution --------------------
Yes. The problem is that he has the permission to view the script, so what permissions does he have?

In the banking system, most online shopping is performed using java... java, which is much more secure than php. In addition, the database is basically not mysql.


------ Solution --------------------
It is more secure to directly write the password in the configuration file. If the server permissions are safe enough, no one else can view your MYSQL password. Even if your source code is leaked, we can configure MYSQL to prevent external access through HTTP or SOCKET, which improves security. Try again. if you do not specify the MYSQL password, it is difficult to ask the user to enter the password for every data query? Is your password still called a password?

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: info-contact@alibabacloud.com 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.