我尝试通过 SSH 在 fortrabbit.com 中迁移数据库,但出现错误:
SQLSTATE[HY000] [2002] 没有这样的文件或目录
如何指定生产数据库的数据库名称、密码?
如何在生产服务器中通过 SSH 访问进行 Laravel3 迁移。我用过 pagodabox,它工作得很好,但成本很高,所以我改用 fortrabbit.com。
我试过这个http://forums.laravel.io/viewtopic.php?id=6177,但没有解决方案。
我尝试通过 SSH 在 fortrabbit.com 中迁移数据库,但出现错误:
SQLSTATE[HY000] [2002] 没有这样的文件或目录
如何指定生产数据库的数据库名称、密码?
如何在生产服务器中通过 SSH 访问进行 Laravel3 迁移。我用过 pagodabox,它工作得很好,但成本很高,所以我改用 fortrabbit.com。
我试过这个http://forums.laravel.io/viewtopic.php?id=6177,但没有解决方案。
We surely will need more info about your problem.
To do a migration on Laravel using ssh, you basically have to go to your app folder and execute php artisan migrate
. But I think you know that, right?
To specify your database infor for production,
1.create a ditectory production inside your app/config
2.copy your current app/config/database.php to it
3.edit your new app/config/production/database.php
4.on your app/start/global.php, configure your environment:
$env = $app->detectEnvironment(array(
'development' => array('localhost'),
'production' => array('example.com')
));
But to clarify it even better, you can watch this fresh video from Jeffrey Way on Laracasts:
https://laracasts.com/lessons/from-zero-to-deploy-with-fortrabbit