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
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):
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
# yum install mysql-server
If you want to install/update software, use
yum if you dont want to mess with dependency solving