title: PHP can't connect to the database after upgrading php and mysql, both to 5.5 on CentOS 5
body: <p>I recently upgraded php from 5.2 to 5.5 on my server running CentOS 5.5.
  Then I also upgraded mysql from 5.1 to 5.5.
  Everething worked fine for a few days until now. Now any application installed on my server (such as trixbox, joomla, even phpMyAdmin) isn't able to connect to the database.
  The problem is, I am receiving just general error messages such as "DB Error: connect failed" or "Cannot start session without errors..." (phpMyAdmin).</p>
  
  <p>MySQL seems to be running and I can access and query it using CLI.
  I've also tested socket functionality like this:</p>
  
  <p><code>mysql -u root -p --socket=/var/lib/mysql/mysql.sock</code></p>
  
  <p>and it worked:</p>
  
  <blockquote>
    <p>Welcome to the MySQL monitor. (...) Your MySQL connection id is 2...</p>
  </blockquote>
  
  <p>Should I downgrade mysql, php installation or both? If so, how?
  Unfortunatelly, I didn't make any backups, except mysqldump, but database data seems fine.</p>