Is there any good advice on MySQL security for the msyql-php interface?

Source: Internet
Author: User
The previous architecture is the front-end PHP to do simple logic and output, the back-end layer of PHP Do data interface, so do not worry about the front end is blown back end MySQL is exposed.
But now want to change the front end to JS, if the API layer exposed and worry about the security of MySQL, see if you have any good way to avoid such problems?

Reply content:

The previous architecture is the front-end PHP to do simple logic and output, the back-end layer of PHP Do data interface, so do not worry about the front end is blown back end MySQL is exposed.
But now want to change the front end to JS, if the API layer exposed and worry about the security of MySQL, see if you have any good way to avoid such problems?

。。。 It can still be encapsulated by the back-end PHP, but the request becomes Ajax. You can consider the data format used by Ajax as JSON.

JS calls php,php again to access MySQL.

Do not say that you are in sql.php?sql=select * from table this form of access.

If it is, it's hopeless.
If not, the security of data access is controlled by PHP, cookies, disposable tokens, etc.

  • 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.