如何在 Laravel 中的 Heroku Cloud 数据库(ClearDB)上运行迁移
我在 Heroku 上面临数据库迁移问题。我尝试在 Heroku 上使用clearDB 来部署带有 mysql 数据库的 laravel 项目。我已经在heroku上成功部署了我的网络应用程序,它在没有与数据库交互的页面上工作正常,但问题是与数据库交互的页面会出现500服务器错误。所以我认为这是数据库的问题,因为我没有' 尝试在Heroku CLI 上运行迁移,
heroku run php artisan migrate --app <app Name>
t 运行迁移,但我已经在heroku Config Vars 上放置了clearDB 的Config Vars 值。因此,我在前两次运行此命令时
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schem a = forge and table_name = migrations and table_type = 'BASE TABLE')
SQLSTATE[HY000] [2002] Connection refused
它显示错误错误图片
我一直在尝试迁移它,但之后我收到了这个我无权访问的错误一个应用程序。
Error: You do not have access to the app laravel-test-demo.
错误 ID:禁止
但我已经登录了heroku cli 第二个错误
I'm facing a problem on databases migration on Heroku .Im trying to deploy my laravel project with mysql databases using clearDB on Heroku. I have deploy my web app successfully on heroku it work fine on pages that has no interaction with databases but the problem is the pages that have interaction with databases would get 500 server error.So it is the problem with databases I think because I haven't run migration but I have already put Config Vars value for clearDB on heroku Config Vars.So I have tried to run migration on Heroku CLI
heroku run php artisan migrate --app <app Name>
the first two time I run this command Its show an error
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schem a = forge and table_name = migrations and table_type = 'BASE TABLE')
SQLSTATE[HY000] [2002] Connection refused
I keep trying to migrate it but after that I got this error that I dont have access to an app.
Error: You do not have access to the app laravel-test-demo.
Error ID: forbidden
but I have already login in heroku cli
second error
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论