-
Notifications
You must be signed in to change notification settings - Fork 352
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
Docker部署时遇到SQLSTATE[HY000] [2002] Connection refused #214
Comments
连不上数据库,检查下你宿主机上的数据库是否启动了,账号密码权限是否已经分配 |
Hi @mylxsw , 感谢回复。我后来尝试的步骤如下:
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: create table 请问是哪一步有问题吗,感谢指导! |
这是用的 mysql8 吧,这样,修改下用户信息 alter user 'wizard'@'%' identified with mysql_native_password by 'wizard'; |
Hi @mylxsw , 谢谢,可以启动了。 |
重现步骤:
执行下列命令:
docker run -it --rm --name wizard
-e DB_HOST=host.docker.internal
-e DB_PORT=3306
-e DB_DATABASE=wizard
-e DB_USERNAME=wizard
-e DB_PASSWORD=wizard
mylxsw/wizard
在docker环境中执行:php artisan migrate:install
遇到下列错误:
SQLSTATE[HY000] [2002] Connection refused (SQL: create table
migrations
(id
int unsigned not null auto_increment primarykey,
migration
varchar(191) not null,batch
int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')哪位大神可以帮忙看一下,可以如何解决,不胜感激!
The text was updated successfully, but these errors were encountered: