Skip to content
Advertisement

I Can’t show my database tables through migration command on powershell terminal (Windows 10)

I tried to run: php artisan migrate

Also to connect to MySQL using terminal on Windows.

I Got this error:

JavaScript

.env file:

JavaScript

I tried to change my DB_HOST to “localhost” but it didn’t work.

When I want to show databases it shows those;

JavaScript

But even if I create tables like these it didn’t see

JavaScript

As you see;

JavaScript

I even delete the extension of “extension=pdo_mysql” but it didn’t work to me.

PLS HELP ME GUYS

Advertisement

Answer

Try to make sure that your server is running, if you are working on the localhost check your Xampp that the server and mysql both are running. see image here make sure these are not stopped like this First run: php artisan migrate and then if you get the error check your .env, that you have provided the correct details or not.

Note: localhost by default have no password, make sure that you have the same password and database name.

Furthermore, if the above doesn’t work for you then try the below commands:

JavaScript

and then:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement