title: Database connection error (2): Could not connect to MySQL for Yoomla on local machine
body: <p>Today I have got a new project that is in Joomla.
  I have website code downloaded on my computer.
  Website administration panel is cpanel.</p>
  
  <p>I have never done anything with Joomla site before.</p>
  
  <p>When I open website on my local machine (http://localhost/ppp/public_html/index.php) it says Database connection error (2): Could not connect to MySQL.
  However, I have changed configuration.php file (it was my guess that I need to change it):</p>
  
  <pre><code>//Before my changes it was the following:
  public $host = 'localhost';
  public $user = 'reiuser_reiuser';
  public $password = 'password';
  public $db = 'reiuser_reiuser';
  
  //After my changes:
  public $host = '174.121.134.94'; //IP was displayed in cpanel
  public $user = 'reiuser_reiuser';
  public $password = 'password';
  public $db = 'reiuser_reiuser';
  </code></pre>
  
  <p>I have read info about this error and most says to check connection data.
  However, I can successfully connect with HeidiSql using those connection data (user/password/db were changed).</p>
  
  <p>Maybe here is not enough information, but maybe Joomla developers can suggest what to do?
  Which Joomla file is dooing connection? Maybe I can do some echos to understand the cause of error?
  Website is using CPanel.</p>
  
  <p>Thank you.</p>