Mysql Hacktricks Verified _verified_ -

If the database server shares a host with a web server and you know the absolute path of the web root, you can drop a web shell:

One of the most powerful privileges in MySQL is the FILE privilege. It allows an authenticated user to read and write arbitrary files on the server's file system, provided the secure_file_priv variable is not set to a restricted directory. mysql hacktricks verified

Do not let just anyone on the internet talk to Port 3306. Lock it down so only trusted web servers can connect. If the database server shares a host with

SELECT CHAR(114,111,111,116); -- Returns "root" mysql hacktricks verified

Prevent remote exposure by ensuring bind-address = 127.0.0.1 is set in the my.cnf configuration file. Use SSH tunneling if remote administration is required.