As mentioned in a comment, rpm is an package manager. yum, is also a package manager but it solves package dependencies for you, and uses rpm to actually install packages.
Both can be used to install software, but in case a package has a dependency (usually they do) rpm will abort if those packages are not included in the command line, where yum will automatically satisfy and install all dependencies for you.
yum requires you to configure at least one repository from where to fetch software, where rpm needs direct access to the package (either a downloaded .rpm or provided from ftp/http).
So, the answer. Check if there is any repo configured
ls /etc/yum.repos.d
If this returns files like *.repo, then something should already be there. If not, try:
# vim /etc/yum.repos.d/centos.repo
With the following contents (asuming you are running centos 6.0):
[centos]
name=centos
baseurl=http://mirror.centos.org/centos/6.0/os/x86_64
enabled=1
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/6.0/os/x86_64/RPM-GPG-KEY-CentOS-6
Then (if there were repos configured or you just did it), run:
# yum search mysql
This should connect to the configured repos, fetch the list of available packages matching the pattern mysql. Once you have identified the package name (should be mysql-server) just:
# yum install mysql-server
If you want to install/update software, use yum if you dont want to mess with dependency solving
$yum install mysql-server. No need to give the architecture and version, yum figures that out itself. – jcrawfordor Aug 11 '11 at 0:22