How to install MySQL 5.1 on Ubuntu 10.10?
sudo apt-get install mysql-server-5.1 mysql-client-5.1 


... from the command prompt should just work.

If not, edit your question with the full error messages you are seeing.

Post-installation steps are summarized in this blog post.