Laravel: No such file or directory (SQL: create table `migrations`)

sqlstate[hy000] [2002] no such file or directory laravel
php artisan migrate no such file or directory
sqlstate[hy000] [2002] connection refused (sql: show full tables where table_type = 'base table')
laravel pdo no such file or directory
string 48 sqlstate hy000 2002 no such file or directory
sqlstate(hy000) (2002) no such file or directory in pdo
illuminatedatabasequeryexception laravel migrate
db query failed: sqlstate(hy000) (2002) no such file or directory

I deleted the migrations table from a Laravel 5.4 database named laravel. When I run php artisan migrate:install, I get this error:

[Illuminate\Database\QueryException]
SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from 
information_schema.tables where table_schema = laravel 
and table_name = migrations)

I deleted and recreated the database. I also ran composer update. No luck. I can run the command in phpMyAdmin and create the table manually.

If you are using localhost as your database host, change it to 127.0.0.1, then run php artisan config:clear and now try php artisan migrate:install again.

php artisan migrate error · Issue #19522 · laravel/framework · GitHub, Laravel Version: 5.4 PHP Version: 7.1 Database Driver SQLSTATE[HY000] [​2002] No such file or directory (SQL: select * from information_schema.tables If this is a fresh install, do you see the migrations table in the DB (i.e. what NowNewStart but I created database 'blog' myself​ in mysql it is  I'm trying to create the migrations with laravel and i get this error: Illuminate\\Database\\QueryException : SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.

Here's what I recommend for .env file:

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306

Then in Database.php add folder location:

'unix_socket' => env('DB_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),

Finally, try:

php artisan config:clear
php artisan migrate:install

Getting an error on the command: php artisan migrate, [PDOException] SQLSTATE[HY000] [2002] No such file or directory. I am using the "Laravel 5.4 from Scratch" tutorial, Episode 22: Testing 101. You have a space in your table schema - blog_testing. @visheshchanana if you mean literally creating the database, I'd suggest the app Sequel Pro if you're  Migrate error: No such file or directory Posted 1 year ago by mahmud2sabuj I am getting the error: Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = blog and table_name = migrations)

I am using MAMP on macOS and after editing localhost to 127.0.0.1 and port to 8888 this problem fixed by adding the following

'unix_socket' => env('DB_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),

to config/database.php file.

Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] No , SQLSTATE[HY000] [2002] No such file or directory But if I try to make a migration, I get this: Illuminate\Database\QueryException : SQLSTATE[HY000] [​2002] No such file or directory (SQL: select * from information_schema.tables I'​m using Laravel 5.7 under macosx, with Homestead and mamp pro. Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Maybe try the following commands

Rollback:

php artisan migrate:rollback

Or a reset using:

php artisan migrate:reset

or do a refresh:

php artisan migrate:refresh

database migration error, SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = laratest and table_name = migrations). Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching.

I deleted the folder and recreated the code base, making sure to point my environment to the correct database server. This time it worked. I don't know exactly what had gone missing to cause the original error.

Laravel SQLSTATE[HY000] [2002] No such file or directory, I was asked to create a CRUD APP with Laravel and Mysql from a potential employer. the client (SQL: select * from information_schema.tables where table_schema This is the command line I executed inside my project folder that is configured by default in Mysql8 and Laravel does not support it well. It sounds like you did a migration, then later on deleted a migration file before you did the rollback. So now Laravel is not sure how to rollback your database.. Easiest solution (since you are reseting anyway) is to manually clear all the tables from your database, including the migration table.

php artisan migrate - DEV Community ‍ ‍ , I installed canvas with the Composer create-project command: There are no migration files in my project blog/database/migrations. SQLSTATE[HY000] [​2002] No such file or directory (SQL: select * from information_schema.tables where  Stack Overflow em Português é um site de perguntas e respostas para programadores profissionais e entusiastas. Leva apenas um minuto para se inscrever.

php artisan canvas:install Fail:SQLSTATE[HY000] [2002] No such , I am trying to migrate a migration I just created with laravel to my freshly created PDOException SQLSTATE[HY000] [2002] No such file or directory This table keeps track of all the migrations that have already run for | your application. There are a few important things to note about this example. Note that we only specified a directory name, not a file name. By default, the store method will generate a unique ID to serve as the file name. The file's extension will be determined by examining the file's MIME type.

PDOException SQLSTATE[HY000] [2002] No such file or directory , SQLSTATE[HY000] [2002] No such file or directory" Error when Migrate. I am connecting to my MySQL database using Laravel Framework. artisan migrate, it shows the error like this: SQLSTATE[HY000] [2002] No such file or directory Hello, First make sure you connection is showing success (you can  Illuminate\Database\QueryException] could not find driver [PDOException] could not find driver - Duration: 3:38. Allround Zone 31,838 views

Comments
  • this works. stackoverflow.com/questions/29305502/…
  • Did you check your database credentials in the .env file?
  • If you are on localhost, don't forget to check your port when the database settings are correct (especially when running MAMP)
  • Instead of getting an error, my terminal now freezes on php artisan migrate.
  • No joy. Getting the same error (SQLSTATE[HY000] [2002] No such file or directory) on each statement.
  • Maybe this will help? stackoverflow.com/questions/27365473/…
  • you can add DB_SOCKET=/Applications/MAMP/tmp/mysql/mysql.sock to .env