MySQL console beep … grrrrrrr

Sitting and doing some evening bed time development is usually not a stressful event. Listening to a calm music and than, in a middle of a chilled out thinking process, awesome, LOUD beep from a PC speaker announcing to my neighbours 10 floors up that I just made a typo when I tried to execute SQL query from mysql console. This awesome feature cased me a heart attack and Wife attack (I got a slap in a head for the attempt of waking my Daughter up).

After a 10 minute relaxation session I decided to put a ripped out speaker back to its original spot in the machine and google for a solution.

It looks like when you are starting the command line MySQL terminal there is a way of disabling the fantastic feature so happily put there by the awesome MySQL team. –b option does it.

C:\projects\>mysql –b –u root –p

Hope you will avoid the little BEEP sound that could wake up dead.

Cheers, Greg

Types supported by Rails Active Record

I’m always looking for those somewhere on web when I need them. Now I’m posting them here so I will always have them handy. If you need them then you can use this as a reference. Below is a list of supported types with its MySQL representation.

  • :primary_key – int(11) DEFAULT NULL auto_increment PRIMARY KEY
  • :stringvarchar(255)
  • :text – text
  • :integer – int limit 4
  • :float – float
  • :decimal – decimal
  • :datetime – datetime
  • :timestamp – datetime
  • :time – time
  • :date – date
  • :binary – blob
  • :boolean – tinyint(1)

It can also be found in this constant in ActiveRecord ConnectionAdapters MysqlAdapter


I think that all the other type mappings could be found in appropriate ActiveRecord Connection adapters.

Cheers, Gregster