迁移 Laravel 时出现什么错误?
What is the error when migrating Laravel?
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
MAMP 起始页 MySQL:
Host: localhost
Port: 8889
User: root
Password: root
Socket: /Applications/MAMP/tmp/mysql/mysql.sock
enter image description here
这可能是什么问题?
P.S。不,清除缓存/配置没有帮助!
我发现了错误是什么,也许有人会告诉你:在 config.inc.php 中,我注册了 'root' 和密码,而不是用户名 - 新创建的条目,进入它并注册它在 .env 文件中 - 一切正常
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
MAMP 起始页 MySQL:
Host: localhost
Port: 8889
User: root
Password: root
Socket: /Applications/MAMP/tmp/mysql/mysql.sock
enter image description here
这可能是什么问题? P.S。不,清除缓存/配置没有帮助!
我发现了错误是什么,也许有人会告诉你:在 config.inc.php 中,我注册了 'root' 和密码,而不是用户名 - 新创建的条目,进入它并注册它在 .env 文件中 - 一切正常