Removing the Beep from MySQL's Console

Jul 8, 10:57 am
tags:

My laptop is typically plugged into a pair of Bose computer speakers, which I recommend highly. Problem is, the occasional error beeps incurred from making some sort of mistake tend to blow me backwards, kind of like that Memorex commercial from long ago. Just this morning I was logged into a freshly installed MySQL console, sipping coffee, and listening to the birds chirping outside when I make a SQL syntax gaffe and BLAM! That annoying beep rattles my brain.

You can remove that wild annoyance in two ways:

1. Pass—no-beep as an option when logging into the console, like so:

%>mysql -u jason -p—no-beep

2. Add no-beep to the my.cnf file.

And shame on me for not backing up my my.cnf file before reinstalling MySQL. :-)

Jason



    1. You can kill off the cursed console beep for all applications by putting the mysterious incantation
        echo -e ”\\33[10;21]\\33[11;1]”
      into your system startup scripts, like /etc/init.d/boot.

      This makes a 21Hz, 1ms duration microbeep, as explained in
      the beep howto:
        http://www.faqs.org/docs/Linux-mini/Visual-Bell.html



    1. To stop the dreaded beep on Windows, you can also type ‘net stop beep’ at the command line.




Add your comments

Please keep your comments relevant to this blog entry: inappropriate or purely promotional comments may be removed. To add hyperlink, please follow this example: "your link text":http://your.link.url