I have a long insert statement with 400,000 characters that does not work when I run it from a script as
$result = $conn->query($sqlfinal);
I echo the sql statement onto the page, it only takes about 20 seconds so it's not a script timeout issue. I copy and paste that result into PhpMyAdmin and it works fine there.
The logs say Error while sending QUERY packet and it works fine when I reduce it to a smaller query with the same syntax of around 25,000 characters. I'm using Hostinger for my hosting provider, I'm trying to figure out if I'm hitting a Hostinger restriction, or a PHP restriction?