Home > Backend Development > PHP Tutorial > laravel 连接数据库超时

laravel 连接数据库超时

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:10:59
Original
2137 people have browsed it

比较郁闷的一种情况,

执行 php artisan migrate 成功

但是在页面上使用的时候,却提示数据库连接失败。

我用的是Laravel5.2版本,按照官网提示,composer原版下载下来,然后执行了php artisan make:auth ,修改了 .env 文件的数据库连接。。

然后执行 php artisan migrate 命令,成功迁移了数据库。没有任何错误。
laravel 连接数据库超时

但是返回到页面后,点击注册,填写完注册表单
laravel 连接数据库超时
求指点。

回复内容:

比较郁闷的一种情况,

执行 php artisan migrate 成功

但是在页面上使用的时候,却提示数据库连接失败。

我用的是Laravel5.2版本,按照官网提示,composer原版下载下来,然后执行了php artisan make:auth ,修改了 .env 文件的数据库连接。。

然后执行 php artisan migrate 命令,成功迁移了数据库。没有任何错误。
laravel 连接数据库超时

但是返回到页面后,点击注册,填写完注册表单
laravel 连接数据库超时
求指点。

看一下你的.env配置文件,还有就是config/database文件

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template