The invention discloses a database protection method and device, a storage medium and computer equipment, and the method comprises the steps of monitoring a target database operation function in a script interpreter, and capturing an SQL statement for accessing a target database; analyzing the SQL statement to obtain a statement structure of the SQL statement; and detecting whether the SQL statement is a database attack or not according to a preset SQL statement structure library and the statement structure of the SQL statement, and intercepting the database attack. According to the embodimentof the invention, the database attack is detected by utilizing the statement structure of the SQL statement, however, in the prior art, the database attack is generally determined by searching the attack features, and as all the attack features cannot be exhausted, an attacker can bypass attack detection only by changing the statement, false alarm or missing alarm is easily caused, and compared with the prior art, the risk that detection can be bypassed by changing statements does not exist, and accurate protection of database attacks can be achieved.