如何在Ionos服务器上上传Laravel项目(Ubuntu)

vsaztqbk  于 2023-04-22  发布在  其他
关注(0)|答案(1)|浏览(118)

我试图在Ionos服务器上运行Laravel项目,但所有步骤都可以像PHP安装制作项目和Mysql数据库一样运行。并更改.env文件,但然后我尝试PHP工匠迁移命令,然后他们显示我告诉你的错误。
我要成功运行迁移

I use Putty Comand on all commands that run, and when I migrate it then showing this error

相同错误显示:root@localhost:~/StripePayment# nano .env root@localhost:~/StripePayment# php artisan migrate
Illuminate\Database\QueryException

SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select * from information_schema.tables where table_schema = stripepayment and table_name = migrations and table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:760756▕         // If an exception occurs when attempting to run a query, we'll format the error757▕         // message to include the bindings with SQL, which will make this exception a758▕         // lot more helpful to the developer instead of just the database's errors.759▕         catch (Exception $e) {➜ 760▕             throw new QueryException(761▕                 $this->getName(), $query, $this->prepareBindings($bindings), $e762▕             );763▕         }764▕     }
+38 vendor frames
39  artisan:37Illuminate\Foundation\Console\Kernel::handle()
hwamh0ep

hwamh0ep1#

你在服务器上安装了php-mysql扩展吗?
要安装php-mysql,请运行以下命令:

apt-get install

相关问题