我在执行时出现以下错误:
php artisan migrate
错误:
Illuminate\Database\QueryException : SQLSTATE[HY000] [2054] The server requested authenti cation method unknown to the client (SQL: select * from information_schema.tables where table _schema = d1 and table_name = migrations)
这是截图;
附言。以防万一:我在我的 php.ini 文件中启用了“extension=pdo_mysql”。
有什么办法解决这个问题吗?
最佳答案
你好,正如这篇文章中提到的:
这是一个典型的 windows 问题。
提到的解决方案是:
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
在 AppServiceProvider.php 中
关于php artisan migrate - 错误 - Illuminate\Database\QueryException : SQLSTATE[HY000] [2054],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51249164/