Craft 2.X Local setup error – Craft not connecting to MySQL (via Sequel Pro)
Rather then passing the database details in virtualhost. You should put the database server details in db.php file as below.

DB.php file below:

&lt;?php

/**
 * Database Configuration
 *
 * All of your system's database configuration settings go in here.
 * You can see a list of the default settings in craft/app/etc/config/defaults/db.php
 */

return array(

    // The database server name or IP address. Usually this is 'localhost' or '127.0.0.1'.
    'server' =&gt; '127.0.0.1',

    // The database username to connect with.
    'user' =&gt; 'root',

    // The database password to connect with.
    'password' =&gt; '',

    // The name of the database to select.
    'database' =&gt; 'db_name',

    // The prefix to use when naming tables. This can be no more than 5 characters.
    'tablePrefix' =&gt; 'craft',

);


Your VHost file should be like below:

#
&lt;VirtualHost *:80&gt;
    ServerName crafty-coffee.local
    DocumentRoot "c:/wamp64/www/crafty-coffee/httpdocs"
    &lt;Directory  "c:/wamp64/www/crafty-coffee/"&gt;
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;


host file (C:\Windows\System32\drivers\etc) :

127.0.0.1   crafty-coffee.local
::1 crafty-coffee.local


This works perfectly for me. After this restart your Sequel Pro.