Home Database Mysql Tutorial 用GreenSQL为MySQL建立防火墙_MySQL

用GreenSQL为MySQL建立防火墙_MySQL

Jun 01, 2016 pm 01:54 PM
app firewall

  因为可以保护你的数据库,从而免受SQL感染,GreenSQL被形象地称为MySQL数据库的”防火墙”。

  对网站和Web应用程序的大量攻击都与所谓的SQL注入漏洞有直接联系。对一些编写得不太好的应用程序来说,这个问题很严峻。因为通过操控发送到Web服务器的数据,它能允许远程用户向数据库服务器发送任意的SQL命令,并且还借助SQL命令对抗由Web应用程序执行的合法的数据库查询。通常,这种对抗发生在没有任何事先检查或清扫处理的情况下。什么办法可以弥补这一缺陷呢?GreenSQL就是MySQL数据库的“防火墙”。它所做的就是拦截正发往MySQL的SQL命令,对命令进行检查,然后停止询问或适量放行。然后把查询结果返回给调用的应用程序。

  GreenSQL 为一些Linux的发行套件提供二进制软件包。如果你的发行版本没有涵盖在下载页面(http://www.greensql.net/download)以内,那可以下载greensql-console和greensql-fw 源码编译。以下是教你在下载这两个文件后怎样进行安装:

  # tar xvzf greensql-fw-0.9.4.tar.bz2

  # cd greensql-fw-0.9.4

  # ./build.sh

  # greensql-create-db.sh

  最后一个命令会为GreenSQL创立一个必需的MySQL数据库,所以你必须确保MySQL正在运行且被设定为听从某个端口(换言之,确保“跳过联网”没有被设定为/etc/my.cnf)。要启动并测试GreenSQL,用这个:

  # greensql-fw -p /etc/greensql &

  # mysql -u root -h 127.0.0.1 -P 3305 -p

  GreenSQL代理听从3305端口。这意味着任何被代理的通过GreenSQL的应用程序都需要被设定成无法使用本地UNIX插孔或无法与本地主机的3306端口连接, 相反应该通过3305端口连接。

  Greensql-console软件包提供了一个Web界面,该界面可以用来查看被锁定的查询,也可以用来设定需要锁定的内容与范畴。把greensql-console源码编译解压到你的站点树,并且将config.phg进行调整以适合于你所选的GreenSQL用户名,密码以及数据库名。

  此外,如果你安装了GreenSQL,你会想确保GreenSQL可以在任何系统都能运行。这取决于你的Linux版本,有可能就像从greensql-fw源树那里拷贝一份初始化指令稿一样那么简单。(例如,rpm/greensql-fw.redhat.init),也许,你希望把它添加到你的本地启动脚本中。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Unable to save changes to Photos app error in Windows 11 Unable to save changes to Photos app error in Windows 11 Mar 04, 2024 am 09:34 AM

If you encounter the Unable to save changes error while using the Photos app for image editing in Windows 11, this article will provide you with solutions. Unable to save changes. An error occurred while saving. Please try again later. This problem usually occurs due to incorrect permission settings, file corruption, or system failure. So, we’ve done some deep research and compiled some of the most effective troubleshooting steps to help you resolve this issue and ensure you can continue to use the Microsoft Photos app seamlessly on your Windows 11 device. Fix Unable to Save Changes to Photos App Error in Windows 11 Many users have been talking about Microsoft Photos app error on different forums

Photos cannot open this file because the format is not supported or the file is corrupted Photos cannot open this file because the format is not supported or the file is corrupted Feb 22, 2024 am 09:49 AM

In Windows, the Photos app is a convenient way to view and manage photos and videos. Through this application, users can easily access their multimedia files without installing additional software. However, sometimes users may encounter some problems, such as encountering a "This file cannot be opened because the format is not supported" error message when using the Photos app, or file corruption when trying to open photos or videos. This situation can be confusing and inconvenient for users, requiring some investigation and fixes to resolve the issues. Users see the following error when they try to open photos or videos on the Photos app. Sorry, Photos cannot open this file because the format is not currently supported, or the file

How to connect Apple Vision Pro to PC How to connect Apple Vision Pro to PC Apr 08, 2024 pm 09:01 PM

The Apple Vision Pro headset is not natively compatible with computers, so you must configure it to connect to a Windows computer. Since its launch, Apple Vision Pro has been a hit, and with its cutting-edge features and extensive operability, it's easy to see why. Although you can make some adjustments to it to suit your PC, and its functionality depends heavily on AppleOS, so its functionality will be limited. How do I connect AppleVisionPro to my computer? 1. Verify system requirements You need the latest version of Windows 11 (Custom PCs and Surface devices are not supported) Support 64-bit 2GHZ or faster fast processor High-performance GPU, most

How to solve application startup error 0xc000012d problem How to solve application startup error 0xc000012d problem Jan 02, 2024 pm 12:53 PM

When a friend's computer is missing certain files, the application cannot start normally with error code 0xc000012d. In fact, it can be solved by re-downloading the files and installing them. The application cannot start normally 0xc000012d: 1. First, the user needs to download ".netframework". 2. Then find the download address and download it to your computer. 3. Then double-click on the desktop to start running. 4. After the installation is completed, return to the wrong program location and open the program again.

MS Paint not working properly in Windows 11 MS Paint not working properly in Windows 11 Mar 09, 2024 am 09:52 AM

Microsoft Paint not working in Windows 11/10? Well, this seems to be a common problem and we have some great solutions to fix it. Users have been complaining that when trying to use MSPaint, it doesn't work or open. Scrollbars in the app don't work, paste icons don't show up, crashes, etc. Luckily, we've collected some of the most effective troubleshooting methods to help you resolve issues with Microsoft Paint app. Why doesn't Microsoft Paint work? Some possible reasons why MSPaint is not working on Windows 11/10 PC are as follows: The security identifier is corrupted. hung system

Fix caa90019 Microsoft Teams error Fix caa90019 Microsoft Teams error Feb 19, 2024 pm 02:30 PM

Many users have been complaining about encountering error code caa90019 every time they try to log in using Microsoft Teams. Even though this is a convenient communication app, this mistake is very common. Fix Microsoft Teams Error: caa90019 In this case, the error message displayed by the system is: "Sorry, we are currently experiencing a problem." We have prepared a list of ultimate solutions that will help you resolve Microsoft Teams error caa90019. Preliminary steps Run as administrator Clear Microsoft Teams application cache Delete settings.json file Clear Microsoft from Credential Manager

Win11 firewall advanced settings gray solution Win11 firewall advanced settings gray solution Dec 24, 2023 pm 07:53 PM

When setting up the firewall, many friends found that their win11 firewall advanced settings were grayed out and unable to be clicked. This may be caused by not adding a control unit, or by not opening the advanced settings in the correct way. Let’s take a look at how to solve it. Win11 firewall advanced settings gray method one: 1. First, click the start menu below, search and open "Control Panel" at the top 2. Then open "Windows Defender Firewall" 3. After entering, you can open "Advanced Settings" in the left column . Method 2: 1. If the above method cannot be opened, you can right-click "Start Menu" and open "Run" 2. Then enter "mmc" and press Enter to confirm opening. 3. After opening, click on the upper left

Shazam app not working in iPhone: Fix Shazam app not working in iPhone: Fix Jun 08, 2024 pm 12:36 PM

Having issues with the Shazam app on iPhone? Shazam helps you find songs by listening to them. However, if Shazam isn't working properly or doesn't recognize the song, you'll have to troubleshoot it manually. Repairing the Shazam app won't take long. So, without wasting any more time, follow the steps below to resolve issues with Shazam app. Fix 1 – Disable Bold Text Feature Bold text on iPhone may be the reason why Shazam is not working properly. Step 1 – You can only do this from your iPhone settings. So, open it. Step 2 – Next, open the “Display & Brightness” settings there. Step 3 – If you find that “Bold Text” is enabled

See all articles