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

docker方式部署初始化数据库失败 #30

Closed
KlausMikealsonK opened this issue Feb 28, 2022 · 2 comments
Closed

docker方式部署初始化数据库失败 #30

KlausMikealsonK opened this issue Feb 28, 2022 · 2 comments

Comments

@KlausMikealsonK
Copy link

web_1 | 正在处理数据库迁移!
db_1 | 2022-02-28 7:30:23 4 [Warning] Access denied for user 'chemex'@'172.20.0.1' (using password: YES)
web_1 |
web_1 | Illuminate\Database\QueryException
web_1 |
web_1 | SQLSTATE[HY000] [1045] Access denied for user 'chemex'@'172.20.0.1' (using password: YES) (SQL: select * from information_schema.tables where table_schema = chemex and table_name = migrations and table_type = 'BASE TABLE')
web_1 |
web_1 | at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
web_1 | 708? // If an exception occurs when attempting to run a query, we'll format the error
web_1 | 709? // message to include the bindings with SQL, which will make this exception a
web_1 | 710? // lot more helpful to the developer instead of just the database's errors.
web_1 | 711? catch (Exception $e) {
web_1 | ? 712? throw new QueryException(
web_1 | 713? $query, $this->prepareBindings($bindings), $e
web_1 | 714? );
web_1 | 715? }
web_1 | 716? }
web_1 |
web_1 | +30 vendor frames
web_1 | 31 app/Console/Commands/Install.php:49
web_1 | Illuminate\Console\Command::call("migrate")
web_1 |
web_1 | +13 vendor frames
web_1 | 45 artisan:37
web_1 | Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

172.20.0.1 这个地址配置文件中没有配置,找不到来源,导致连接数据库失败

@celaraze
Copy link
Owner

celaraze commented Mar 1, 2022

这个是你docker中mariadb所对应的地址,不是在配置中填写的,先确认docker中mariadb是否有启动

@KlausMikealsonK
Copy link
Author

嗯嗯,是mariadb 对应的用户名 没配置对,感谢回复

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

2 participants