I got this problem with a LOAD DATA LOCAL INFILE executing an sql from phpmyadmin 4.9.5 on ubuntu 20.04 with mysql server 8.0.35 and php 7.4
I set global local_infile=on as first step in sql to avoid "error 1290 - The MySQL server is running with the --secure-file-priv option so it cannot execute"; but I got "error #2000 local infile is forbidden", so I modified php.ini in /etc/php/7.4/apache2 and /etc/php/7.4/cli (I found different suggests ...) but it didn't work.
As you can see mysqli.allow_local_infile is enabled in php :
sudo php -r 'phpinfo();' | grep -i mysqli
/etc/php/7.4/cli/conf.d/20-mysqli.ini,
mysqli
MysqlI Support => enabled
mysqli.allow_local_infile => On => On
mysqli.allow_persistent => On => On
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => no value => no value
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.reconnect => Off => Off
mysqli.rollback_on_cached_plink => Off => Off
API Extensions => mysqli,pdo_mysql
Where I'm going wrong?
Thanks Gianpiero