我正在尝试为我的项目设置 xampp/laravel/mysql,但我收到错误,提示 Illuminate\Database\QueryException

问题描述 投票:0回答:1
PS C:\xampp\htdocs\myapp> php artisan migrate

   Illuminate\Database\QueryException

  SQLSTATE[42S02]: Base table or view not found: 1932 Table 'laravel.migrations' doesn't exist in engine (SQL: select `migration` from `migrations` order by `batch` asc, `migration` asc)

  at C:\xampp\htdocs\myapp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:760
    756▕         // If an exception occurs when attempting to run a query, we'll format the error
    757▕         // message to include the bindings with SQL, which will make this exception a
    758▕         // lot more helpful to the developer instead of just the database's errors.
    759▕         catch (Exception $e) {
  ➜ 760▕             throw new QueryException(
    761▕                 $query, $this->prepareBindings($bindings), $e
    762▕             );
    763▕         }
    764▕     }

  i   A table was not found: You might have forgotten to run your database migrations.
      https://laravel.com/docs/master/migrations#running-migrations

  1   C:\xampp\htdocs\myapp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:414
      PDOException::("SQLSTATE[42S02]: Base table or view not found: 1932 Table 'laravel.migrations' doesn't exist in engine")

  2   C:\xampp\htdocs\myapp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:414
      PDO::prepare("select `migration` from `migrations` order by `batch` asc, `migration` asc")
PS C:\xampp\htdocs\myapp>

运行上述命令后,我收到此类消息。我试图查找数据库的密码,但它是空的,什么也没有。

请帮忙

laravel migration
1个回答
0
投票

检查您的 .env 文件 并匹配数据库值

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