Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不懂为什么每次运行php artisan migrate:install都会报错 #205

Open
regret031 opened this issue Jun 16, 2022 · 2 comments
Open

Comments

@regret031
Copy link

配置看到是这样的:
docker exec wizard env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=bd738f049594
DB_PASSWORD=wizard
DB_DATABASE=wizard
APP_DEBUG=true
DB_HOST=host.docker.internal
DB_PORT=3306
DB_CHARSET=utf8
DB_COLLATION=utf8_unicode_ci
DB_USERNAME=wizard
PHPIZE_DEPS=autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c
PHP_INI_DIR=/usr/local/etc/php
APACHE_CONFDIR=/etc/apache2
APACHE_ENVVARS=/etc/apache2/envvars
PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PHP_LDFLAGS=-Wl,-O1 -pie
GPG_KEYS=CBAF69F173A0FEA4B537F470D66C9593118BCCB6 F38252826ACD957EF380D39F2F7956BC5DA04B5D
PHP_VERSION=7.3.33
PHP_URL=https://www.php.net/distributions/php-7.3.33.tar.xz
PHP_ASC_URL=https://www.php.net/distributions/php-7.3.33.tar.xz.asc
PHP_SHA256=166eaccde933381da9516a2b70ad0f447d7cec4b603d07b9a916032b215b90cc
APACHE_DOCUMENT_ROOT=/webroot/public
HOME=/root

然后每次都是报这个错误
In Connection.php line 664:
SQLSTATE[HY000] [2002] Connection refused (SQL: create table migrations (id int unsigned not null auto_incremen
t primary key, migration varchar(191) not null, batch int not null) default character set utf8 collate 'utf8_un
icode_ci')
In Exception.php line 18:
SQLSTATE[HY000] [2002] Connection refused
In PDOConnection.php line 40:
SQLSTATE[HY000] [2002] Connection refused
用的是windoes的docker
image
可以帮忙解答一下这个是哪里有错吗?
感觉太难了。。。

@RiverChu0
Copy link

同样的报错,说明文档不够傻瓜化,不能让一些不熟悉相关工具的人快速运行项目。。。

@mylxsw
Copy link
Owner

mylxsw commented Jun 17, 2022

宿主机上的 MySQL 启动了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants