If yum doesn't provide packages for MySQL 5 and PHP5, you must compile them manually (or find a third-party CentOS repository that has those packages).