Automate refresh of large MySQL table on shared hosting (avoid max_allowed_packet error) -
i need regularly replace large mysql table on website. wrote php script this....
- export table local server .sql file (contains create table , inserts)
- zip
- ftp remote host
and on remote host run script ....
- unzip it
- import table mysql database
i.e. import table run ...
. . . $querystg = file_get_contents($sqlfilename); $sqlquery = mysqli_multi_query($mysqlilink, $querystg); . . .
but error message ...
got packet bigger 'max_allowed_packet' bytes
i'm on shared hosting (godaddy) cant fiddle things my.cfg or run mysql commands ssh
is there way round this. e.g. there command splits import smaller batches or there better way this?
Comments
Post a Comment