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

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -