php artisan migrate不适用于Laravel5.4中的XAMP

php artisan migrate不适用于Laravel5.4中的XAMP,laravel,phpmyadmin,artisan-migrate,Laravel,Phpmyadmin,Artisan Migrate,我正在使用命令php artisan migrate,但它显示错误为用户访问被拒绝,我的所有迁移已成功创建,但它们无法在localhost phpmyadmin中迁移 在comand promt中,我成功创建了迁移,但无法在localhost phpmyadmin中迁移,我尝试了所有配置设置,但都不起作用 在Connection.php第647行中: SQLSTATE[HY000][1045]使用密码拒绝用户“root”@“localhost”的访问:否SQL:select*from infor

我正在使用命令php artisan migrate,但它显示错误为用户访问被拒绝,我的所有迁移已成功创建,但它们无法在localhost phpmyadmin中迁移

在comand promt中,我成功创建了迁移,但无法在localhost phpmyadmin中迁移,我尝试了所有配置设置,但都不起作用

在Connection.php第647行中:

SQLSTATE[HY000][1045]使用密码拒绝用户“root”@“localhost”的访问:否SQL:select*from informati 在_schema.tables上,其中table_schema=Blog和table_name=migrations

在Connector.php第68行中:


使用密码拒绝用户“root”@“localhost”的SQLSTATE[HY000][1045]访问:否此错误表示为应用程序指定的数据库登录详细信息不正确。而且您似乎没有在env文件中提供DB_密码值。检查登录详细信息用户名和密码,并确保用户具有访问指定数据库的权限

要确认登录详细信息是否正确,请打开终端并运行: mysql-u DB_USERNAME-p将DB_USERNAME替换为您的DB USERNAME,例如root,它将提示输入密码,如果有密码,请输入密码,然后按enter键。如果一切顺利,你应该看到这样的情况:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.18 Homebrew

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

运行php artisan tinker,然后键入config'database'输出是否显示了正确的数据库凭据?是的,它显示了正确的数据库名称、用户名和密码等。当我安装phpmyadmin时,我添加了用户名:khadija和密码:zx2ct,但后来我将其更改为用户名:root和密码:“”。在env文件和所有其他配置文件中,我也做了相同的更改,但现在我的本地主机使用以前的用户名和密码登录,但无法在php中显示结果。请尝试再次更改db用户名和密码,然后在.env文件中设置。运行php artisan config:clear以确保配置已更新,然后重试