我使用該命令啟動了一個新項目。laravel^6.2laravel new myapp然后編輯我的文件以連接到我的本地數據庫:.envDB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=8082DB_DATABASE=laravelDB_USERNAME=rootDB_PASSWORD=root然后我決定從laravel默認數據庫結構。當我說默認結構時,我說的是從文件開始就已經創建的遷移:migrateusers2014_10_12_000000_create_users_table.php<?php// *** This has been generated from `laravel new myapp` ***use Illuminate\Database\Migrations\Migration;use Illuminate\Database\Schema\Blueprint;use Illuminate\Support\Facades\Schema;class CreateUsersTable extends Migration{ /** * Run the migrations. * * @return void */ public function up() { Schema::create('users', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name'); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); $table->rememberToken(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('users'); }}所以我運行命令,然后發生了一些意想不到的事情。事實上,在那之后,終端不會做任何事情,就好像它正在休息一樣。我想也許該命令需要一段時間才能執行,但是在持續了大約十分鐘的幾次嘗試之后,沒有任何反應。php artisan migrate所以我決定查閱日志,但絕對沒有寫下任何東西,它完全是空的。因此,我正在嘗試執行并重新開始,但結果是相同的:沒有錯誤消息,也沒有發生任何事情。php artisan cache:clear我知道這個問題以前在這里被問過,但沒有真正提出答案。有人知道我錯過了什么嗎?
“php artisan migrate”仍處于暫停狀態,不會導致錯誤
慕工程0101907
2022-08-19 16:36:55