http://www.serveradminblog.com/2011/03/tuning-mysql-performance-howto-part-1/ systemctl start mysql sudo ufw allow from remote_ip_address to any port 3306 sudo ufw status CREATE USER 'homestead2'@'%' IDENTIFIED BY 'secret2' WITH GRANT OPTION; GRANT ALL ON *.* TO 'homestead2'@'%'; FLUSH PRIVILEGES; sudo systemctl stop mysql.service sudo systemctl set-environment MYSQLD_OPTS="--skip-networking --skip-grant-tables" sudo systemctl start mysql.service sudo systemctl status mysql.service --------------------------- set global local_infile=true; !!!! 'config' => [ PDO::MYSQL_ATTR_LOCAL_INFILE => true, ], https://github.com/ellgreen/laravel-loadfile SET GLOBAL local_infile=1;