gpt4 book ai didi

php - 有了这个 laravel sql 权限有什么好的解决方案吗?

转载 作者:行者123 更新时间:2023-11-29 10:27:55 27 4
gpt4 key购买 nike

当 laravel 尝试访问 mysql 时,我收到错误,它是这样的

   ` enter code here
SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' (SQL: sele
ct * from information_schema.tables where table_schema = blog and table_nam
e = migrations)
In Connector.php line 67:

SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' `enter code here`
`

最佳答案

这不是laravel本身的问题。检查DB相关.env设置。通常有类似这样的:

DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=default
DB_USERNAME=root
DB_PASSWORD=secret

关于php - 有了这个 laravel sql 权限有什么好的解决方案吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47943455/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com