There is no way to recover a lost database password, but that is for your own safety. The password itself is stored in an md5hash sum in MySQL for security.
The best way to recreate a lost password is to reset it for the database user. You can do this by removing the database user and then re-creating it with the new password.
Remember, if your site is using a content management system, such as WordPress or Joomla, then the database password is usually within the configuration file in clear text.
Photo by Dev.Arka