SQLSTATE[HY000] [2002] No such file or directory during installation #778

Closed
opened 2026-02-04 22:15:36 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @sebastienhouzet on GitHub (Aug 17, 2018).

Hello

Describe the bug
During manual installation : https://www.bookstackapp.com/docs/admin/installation/

Steps To Reproduce
Folllow the doc about manual installation.
On step 8 : i have this error :

capture d ecran 2018-08-17 a 11 40 07

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): 0.23.1
  • PHP Version: 7.0.22
  • Hosting Method (Nginx/Apache/Docker): Apache

Thx :)

Originally created by @sebastienhouzet on GitHub (Aug 17, 2018). Hello **Describe the bug** During manual installation : https://www.bookstackapp.com/docs/admin/installation/ **Steps To Reproduce** Folllow the doc about manual installation. On step 8 : i have this error : <img width="1088" alt="capture d ecran 2018-08-17 a 11 40 07" src="https://user-images.githubusercontent.com/2550639/44259690-8b997080-a212-11e8-8989-684b044f3978.png"> **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): 0.23.1 - PHP Version: 7.0.22 - Hosting Method (Nginx/Apache/Docker): Apache Thx :)
OVERLORD added the 🐕 Support label 2026-02-04 22:15:36 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Aug 19, 2018):

Hi @sebastienhouzet,
It would seem that BookStack is having trouble accessing the database.
Can you review the settings in your .env file?

If you have DB_HOST=localhost set you could try changing this to DB_HOST=127.0.0.1.
Otherwise, Ensure DB_HOST, DB_DATABASE, DB_USERNAME and DB_PASSWORD are all set properly .

@ssddanbrown commented on GitHub (Aug 19, 2018): Hi @sebastienhouzet, It would seem that BookStack is having trouble accessing the database. Can you review the settings in your `.env` file? If you have `DB_HOST=localhost` set you could try changing this to `DB_HOST=127.0.0.1`. Otherwise, Ensure `DB_HOST`, `DB_DATABASE`, `DB_USERNAME` and `DB_PASSWORD` are all set properly .
Author
Owner

@sebastienhouzet commented on GitHub (Aug 20, 2018):

Hello,

Yes i have try this, but nothing work.

I have try docker version and it work, but impossible with manual installation.

Seb

@sebastienhouzet commented on GitHub (Aug 20, 2018): Hello, Yes i have try this, but nothing work. I have try docker version and it work, but impossible with manual installation. Seb
Author
Owner

@ssddanbrown commented on GitHub (Aug 20, 2018):

@sebastienhouzet Are you able to connect via command line using the same details as in your .env file?

mysql -h 127.0.0.1 -u username --port=13306 -p books
@ssddanbrown commented on GitHub (Aug 20, 2018): @sebastienhouzet Are you able to connect via command line using the same details as in your `.env` file? ``` mysql -h 127.0.0.1 -u username --port=13306 -p books ```
Author
Owner

@sebastienhouzet commented on GitHub (Aug 21, 2018):

i used MAMP PRO 4.X. I have other project with laravel and it work.

Problem is not connection to MySQL but the request:

SQL: select * from information_schema.tables where table_schema = books and table_name = migrations


Erreur
Analyse statique :

2 erreurs trouvées lors de l'analyse.

Caractère inattendu. (near ":" at position 3)
Type d'énoncé non reconnu. (near "SQL" at position 0)
Requête SQL : Documentation

SQL: select * from information_schema.tables where table_schema = books and table_name = migrations

MySQL a répondu : Documentation

#1064 - Erreur de syntaxe près de 'SQL: select * from information_schema.tables where table_schema = books and tabl' à la ligne 1

@sebastienhouzet commented on GitHub (Aug 21, 2018): i used MAMP PRO 4.X. I have other project with laravel and it work. Problem is not connection to MySQL but the request: SQL: select * from information_schema.tables where table_schema = books and table_name = migrations --- Erreur Analyse statique : 2 erreurs trouvées lors de l'analyse. Caractère inattendu. (near ":" at position 3) Type d'énoncé non reconnu. (near "SQL" at position 0) Requête SQL : Documentation SQL: select * from information_schema.tables where table_schema = books and table_name = migrations MySQL a répondu : Documentation #1064 - Erreur de syntaxe près de 'SQL: select * from information_schema.tables where table_schema = books and tabl' à la ligne 1
Author
Owner

@ssddanbrown commented on GitHub (Aug 21, 2018):

@sebastienhouzet The SQL query is fairly simple and well supported. The errors copied above just seem to be from including SQL: as part of the query which it should not be.

@ssddanbrown commented on GitHub (Aug 21, 2018): @sebastienhouzet The SQL query is fairly simple and well supported. The errors copied above just seem to be from including `SQL:` as part of the query which it should not be.
Author
Owner

@sebastienhouzet commented on GitHub (Aug 22, 2018):

This requete is execute during command:

In the application root, Run php artisan key:generate to generate a unique application key.

@sebastienhouzet commented on GitHub (Aug 22, 2018): This requete is execute during command: `In the application root, Run php artisan key:generate to generate a unique application key.`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#778