bash - Add max_allowed_packet to my.cnf in vagrant environment -


so have box includes mysqldump file executed @ provision. problem need increase max_allowed_packet variable before execute script.

how can like:

max_allowed_packet = 128m >> /etc/my.cnf 

but rather @ eof after [mysqld] section

thank you

with gnu sed:

sed -i 's|\[mysqld\]|&\nmax_allowed_packet = 128m|' /etc/my.cnf 

-i: edit file "in place"

&: refer portion matched

\n: new line


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -