lundi 16 avril 2018

PHP artisan migrate not works

this is my config details - it's 100% correct

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=bglee
DB_USERNAME=root
DB_PASSWORD=

the migrate file

Schema::create('users', function (Blueprint $table) {
            $table->char("name" , 80);
            $table->char("username" , 50)->primary();
            $table->char("email" , 50)->unique();
            $table->char("password",50);
            $table->char("phone",25)->unique();
            $table->char("country",40)->nullable();
            $table->char("government",40)->nullable();
            $table->char("area",40)->nullable();
            $table->string("address")->nullable();
            $table->char("floor",20)->nullable();
            $table->char("apart",20)->nullable();
            $table->char("gender",10)->nullable();
            $table->integer("byear")->nullable();
            $table->integer("bmonth")->nullable();
            $table->integer("bday")->nullable();
            $table->char("aphone",25)->nullable();
            $table->integer("points")->default(0);
            $table->timestamps();
        });

the PHP artisan migrate always fire these errors

PDOException::("SQLSTATE[HY000] [1049] Unknown database 'bglee'")

I use the last version of laravel

the database name is correct and exist

enter image description here



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire