Skip to content

[Bug] Migration fails, no such file or directory #66

Closed
@jackmcdade

Description

@jackmcdade

I can run the Schema builder manually and everything works just fine. Example:

Schema::create('users', function($table)
{
    $table->increments('id');
});

But when using the Artisan Migrate command, I get the following error:

[PDOException]                                    
SQLSTATE[HY000] [2002] No such file or directory  

[ErrorException]                                                                                                                                                                  
Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /path/to/laravel/vendor/laravel/framework/sr  
  c/Illuminate/Database/Connectors/Connector.php line 47                                                                                                                                                                       

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions