Every now and then you’ll see an error like “Packet Too Large” in MySQL, as seen below. When you run into this, you’re trying to shove more information into a given SQL statement than is allowed. So to fix, you have a few different options, starting with the best, which is to make your SQL better. But not everyone has control of things like source code. So you might need to change the value in mysql itself. To do so, simply run the mysql command with the –max_allowed_packet and then put = followed by the size of the packet. For example, to make it 128: mysql --max_allowed_packet=128M Now, by default…
-
-
Disabling Bonjour
Love it or not, some environments insist on disabling Bonjour, Apple’s implementation of Multicast DNS. Despite the fact that mDNS has been around since 2000 and is widely used by Microsoft, we still look to disable this from time to time. As Arek Dreyer mentioned last week at MacSysAdmin in Gothenburg, Sweden, you can’t just disable the mDNSResponder LaunchDaemon or you will bork DNS (my word I think, not his). Instead, to disable Bonjour you would add the -NoMulticastAdvertisements option into the ProgramArguments array in the /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist file. This can be done manually, or it can be automated with the following command: defaults write /System/Library/LaunchDaemons/com.apple.mDNSResponder ProgramArguments -array “/usr/sbin/mDNSResponder” “-launchd” “-NoMulticastAdvertisements”…
-
Self Destructing Scripts
I have mentioned creating a self destructing script or launchd item a few times in articles on this site. But it was recently pointed out that I never actually showed how to go about doing so. Until recently I would actually use an out-of-band script to remove a script, a launchd agent or a launchd daemon. However, this would invariably leave elements somewhere on a file system of the script. For example, within a script I would echo out another script, fire off that script and then use it to delete (rm) the original script. When I planned out a deployment or a series of scripts I would always have…