Upgrading MySQL and PHP through SSH

Do you know by chance how to upgrade your server to .php & MYSQL 5, by way of SSH ?

I need help. My host is trying to charge me to upgrade php and MYSQL to version 5 on my server. I don’t want to pay. $ is scarce for the moment. They said I have to possibly use SSH to upgrade, and one of my sites is suffering, from not being able to upgrade. Do yo uknow how I can do this for free?

SSH only connects you to your server, once connected you need to know how to upgrade your mysql server from the command line.

I use Redhat Fedora servers, so yum update does the work for me.

Tell exactly the name of linux distributive, isn’t it blocked root access on ssh?