1. mv /var/lib/rpm/__db* /tmp

  2. yum clean all

  3. yum -y update

  4. rm -i /tmp/__db*

Reference
  1. How To Solve “Error: rpmdb open failed” Error In CentOS