Four values connect an application to its database:

  • Host - localhost. This trips people up constantly. Your database lives on the same server as your files, so the application does not need a domain name or an IP address to reach it.
  • Database name - the full prefixed name, for example user_shop.
  • Username - also prefixed, for example user_shopadmin.
  • Password - whatever you set when you created the user.

If a site is already running and you have lost the password, you do not need to recover it. Look in the application config file to find the database and username, then use MySQL Databases in cPanel to set a new password for that user, and update the config file to match.

The config file is:

  • WordPress - wp-config.php
  • Joomla - configuration.php
  • Magento - app/etc/env.php
  • Laravel - .env
Je li Vam ovaj odgovor pomogao? 0 Korisnici koji smatraju članak korisnim (0 Glasovi)