title: SQLSTATE[HY000] [2002] Permission denied Laravel PDO Driver (credentials working via artisan migrate)
body: <p>I'm having a lot of trouble with the PDO driver on this new installation</p>
  
  <p>This is the error I get when trying to do any db operation triggered by laravel.</p>
  
  <pre><code>ext Illuminate\Database\QueryException: SQLSTATE[HY000] [2002] Permission denied (SQL: select * from `users` where `email` = ethan@gmail.com limit 1) in /var/www/html/mypath/vendor/laravel/framework/src/Illuminate/Database/Connection.php:647
  </code></pre>
  
  <p>What's really strange here, is that PDO is enabled in php, and we're using the same credentials that php artisan migrate used to create the tables (so I know credentials, mysql socket are all working)</p>
  
  <p>This is the PDO error from the stack</p>
  
  <pre><code>at PDO-&gt;__construct('mysql:unix_socket=/mnt/volume_sfo2_01/mysql_data/mysqld.sock;dbname=testdb1', 'dbuser1', 'mypassword', array(0, 2, 0, false, false))
  in Connector.php line 68
  </code></pre>
  
  <p>Note that I did move the datadirectory of mysql and thus the change for the socket.  This config works running the migrate, so what am I missing to get it working with the laravel PDO driver?</p>
  
  <p>On ubuntu server 16 as well.
  Nginx + php7.1
  apparmor has been disabled additional just for this testing.  Any ideas would be greatly appreciated.</p>