In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you what MysqL security strategies are, I hope you will gain something after reading this article, let's discuss it together!
1: use preprocessing statements to prevent SQL injection
2: the data written to the database should be escaped with special characters, such as single quotation marks and double quotation marks in characters need to be escaped at the application layer, in order to prevent SQL injection
3: do not return the error message of the query to the user, log the error to the log. Error messages should not be displayed in the application, so the user will get the database information, so it is not safe. We should shield the errors and check the log regularly.
Note: the PHP side uses PDO for database-related operations as far as possible. PDO has a good support for preprocessing statements, and Mysqli also has, but the scalability is not as good as PDO,PDO supports extended libraries, not only supporting Mysql, but slightly more efficient than PDO, but Mysqli only supports Mysql,Mysql function libraries that tend to be eliminated in the new version, so it is not recommended, and it does not support preprocessing.
4: make regular data backup
5: do not give root permission to query users, and assign permissions reasonably; for example, the server has many applications and cannot give root permission to each
6: turn off remote access to the database, so it may be cracked and it will not be safe.
7: modify the root password without the default password. It is complicated and cannot be easily guessed.
8: delete redundant users
9: change the name of the root user and change something that is not easy for others to guess
10: restrict ordinary users from browsing other libraries; for example, multiple applications, each application establishes an independent user and cannot access other libraries
11: restrict users' access to data files, restrict the permissions of files, not only restrict the access of each user to the mysql library, but also restrict the permissions of the data directory in which mysql stores data
After reading this article, I believe you have a certain understanding of "what are the MysqL security strategies". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.