One of those very helpful error messages. I got this error when importing a large database, and it was caused by some insert statements exceeding the configured
max_allowed_packet size (manual). According to this bug entry, the error message should actually say
Got a packet bigger than 'max_allowed_packet' bytes
but that doesn’t seem to fixed to this day. To fix the error, simply increase max_allowed_packet in your my.cnf file, under the [mysqld] section, e.g.
max_allowed_packet = 16M
Apparently, in newer versions of MySQL, the error message looks like this:
ERROR 2013 (HY000) at line X: Lost connection to MySQL server during query
I usually work with a tab width of 4 when editing code, but
git-diff (that is the *nix
less program) seems to use a default tab width of 8. You can change this behavior by setting the
core.pager option to something like this:
This would result in a tab width of 4. If you are not familiar with git config, here’s how you set the option:
$ git config --global core.pager 'less -x4'
If you remove the
--global flag, the option will be changed only for the current git repository, otherwise it will be changed globally for the current user account.
It happens to all of us, today it happened to me. Conveniently on a production system. Instead of
rm -Rf ./* I typed
rm -Rf /*, and lots of stuff was gone.