1024programmer Mysql How does mysql prevent sql injection problems

How does mysql prevent sql injection problems

Mysql prevents sql injection method: 1. Turn on the magic mode of php, set [magic_quotes_gpc = on]; 2. Write the code to filter sql special characters in the website code, and convert some special characters; 3. , Open the website firewall, IIS firewall, built-in parameters for filtering sql injection.

How to prevent mysql from sql injection:

1. Turn on the magic mode of php and set magic_quotes_gpc = on, when some special characters appear on the front end of the website, they will be converted automatically, and converted into some other symbols, which will cause the sql statement to fail to execute. You can also find a professional website security company to handle it. The domestic SINE Security, NSFOCUS, and Venustech are all relatively good. They carry out security reinforcement for the website, server security protection, and mysql security deployment.

2. In the website code, write the code to filter special characters in sql, and convert some special characters, such as single quotes, commas, *, (brackets) AND 1=1, backslash, select union The sql statements such as queries are all filtered for security, restricting the input of these characters, and prohibiting them from being submitted to the backend.

3. Open the website firewall, IIS firewall, apache firewall, and nginx firewall, all of which have built-in parameters for filtering sql injection.

More related free learning recommendations: mysql tutorial (video)

The above is the detailed content of how mysql prevents sql injection problems, please pay attention to 1024programmer for more .com Other related articles!

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/how-does-mysql-prevent-sql-injection-problems/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索