 <p>I'm with the same problem time ago, you need to give privileges to the users to connect to the localhost, is different localhost from apache to mysql permissions</p> <p>Possibly a security precaution. You could try adding a new administrator account:</p> <pre><code>mysql&gt; CREATE USER 'yorsh'@'localhost' IDENTIFIED BY 'some_pass'; mysql&gt; GRANT ALL PRIVILEGES ON *.* TO 'yorsh'@'localhost' -&gt; WITH GRANT OPTION; mysql&gt; CREATE USER 'yorsh'@'%' IDENTIFIED BY 'some_pass'; mysql&gt; GRANT ALL PRIVILEGES ON *.* TO 'yorsh'@'%' -&gt; WITH GRANT OPTION; FLUSH PRIVILEGES; </code></pre>