工作我在laravel新手,试图运行php artisan migrate:install
,就有了一个错误迁移::安装不laravel
[PDOException]
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
我已经修改应用程序/配置/本地/ database.php中和app/config/database.php like -
'fetch' => PDO::FETCH_CLASS,
'default' => 'mysql',
'connections' => array(
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'laravel_db',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
)
[可能相关的问题](http://stackoverflow.com/questions/5376427/cant-connect-to-local-mysql-server-through-socket-var-mysql-mysql-sock-38) – Supericy
@Supericy :但实际问题不是这样。我有解决方案。张贴在我的答案。 – iNikkz