If when compiling MySQL5 you get an error similar to the following:
sed: can't read y.tab.c: No such file or directory
make: *** [sql_yacc.cc] Error 2
Then you're probably missing the bison package.
To remedy, first install bison:
sudo apt-get install bison
Then start the mysql build again with a fresh start:
make distclean; ./configure; make
Your troubles should be over.