迁移Laravel会发生什么错误?

问题描述 投票:0回答:1
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) 
(SQL: select * from information_schema.tables where table_schema = laravel_blog and table_name = migrations and table_type = 'BASE TABLE') 

尝试从数据库迁移到PhpMyAdmin时发生此错误。

我的.env文件:

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=8889
DB_DATABASE=laravel_blog
DB_USERNAME=root
DB_PASSWORD=root

MySQL的MAMP起始页:

Host: localhost
Port: 8889
User: root
Password: root
Socket: /Applications/MAMP/tmp/mysql/mysql.sock

enter image description here

这里可能是什么问题?附言不,清除缓存/配置无济于事!

php mysql laravel mamp
1个回答
0
投票

我发现了错误所在,也许有人会告诉您:在config.inc.php中,我不是用户,而是注册了'root'和密码-新创建的条目,进入了它,并在.env中注册了它。文件-一切正常

© www.soinside.com 2019 - 2024. All rights reserved.