title: Laravel 4 artisan migration unable to connect to remote mysql db [HY000] [1450] Access denied for user 'myuser'@'mypc' (using password: YES)
body: <p>EDIT: I finally realised artisan is trying to connect to my machine instead of the remote database host specified in config. I assumed it would retrieve the hosts address along with the username and password. I'll try to specify the host's address on commandline and post back.</p>
  
  <p>EDIT 2: I found the problem. Technical support for the host mislead me to my first edit. The problem was a mismatch in the password between a '1' and an 'l'. Sorry to have wasted your time.</p>
  
  <p>I'm developing a Laravel 4 web app and I'm trying to execute migrations from sentry into a remote mysql database. I have been able to connect via phpmyadmin using the same credentials stored into laravel without any hassle, but artisan won't work.</p>
  
  <p>Here's artisan command and output:</p>
  
  <pre><code>$ php artisan migrate --package=cartalyst/sentry
  
  [PDOException]                                                               
  SQLSTATE[HY000] [1045] Access denied for user 'myuser'@'mypc' (using password: YES)                                                          
  
  migrate [--bench[="..."]] [--database[="..."]] [--path[="..."]] [--package[="..."]] [-- pretend] [--seed]
  </code></pre>
  
  <p>Laravel connection config:</p>
  
  <pre><code>'default' =&gt; 'mysql',
  [...]
  'mysql' =&gt; array(
          'driver'    =&gt; 'mysql',
          'host'      =&gt; 'hostname.example.com',
          'database'  =&gt; 'mydb',
          'username'  =&gt; 'myuser',
          'password'  =&gt; 'supersecretpassword',
          'charset'   =&gt; 'utf8',
          'collation' =&gt; 'utf8_unicode_ci',
          'prefix'    =&gt; '',
     ),
  </code></pre>
  
  <p>I don't have mysql installed locally, just apache, php and phpmyadmin. My box is archlinux and I don't have access to the remote host.</p>
  
  <p>Any ideas?</p>