Hardening MySQL File Access with local_infile=0 and secure_file_priv=NULL

MySQL needs permission to read and write ordinary database files, but most application databases do not need SQL statements to exchange arbitrary files with the operating system. If a server exists primarily for WordPress or another web application, leaving unused file-transfer features enabled creates unnecessary attack surface. Two MySQL settings provide a useful layer of defence: [mysqld]…