To do this, you'll need to add two lines to your ~/.bashrc:
shopt -s histappend
PROMPT_COMMAND="history -a;$PROMPT_COMMAND"a;history -c;history -r;$PROMPT_COMMAND"
From man bash:
If the histappend shell option is enabled (see the description of shopt under SHELL BUILTIN COMMANDS below), the lines are appended to the history file, otherwise the history file is over-written.