[GH-ISSUE #1310] Koel cannot connect to the database. #758

Closed
opened 2026-02-26 02:34:11 +03:00 by kerem · 2 comments
Owner

Originally created by @yuis-ice on GitHub (Apr 24, 2021).
Original GitHub issue: https://github.com/koel/koel/issues/1310

After I followed the guide https://docs.koel.dev/#client , downloaded and unzipped the latest zip, did composer install, and tried php artisan koel:init --no-assets but I don't quite understand this part. I'd like to tell the Koel to create a new sqlite database and get started with the sqlite file, since I prefer sqlite for its simple accessibility, so I told the prompt "sqlite-e2e" and proceeded but the next prompt asked me "Absolute path to the DB file:", and I typed like "whatevertmp.db" and it failed, apparently the prompt need an existing database file ...? kindly tell me if I missed a concept of Koel. what can I do now?

$ php artisan koel:init --no-assets
Attempting to install or upgrade Koel.
Remember, you can always install/upgrade manually following the guide here:
📙  https://docs.koel.dev

App key exists -- skipping
could not find driver

Koel cannot connect to the database. Let's set it up.

 Your DB driver of choice [MySQL/MariaDB]:
  [mysql     ] MySQL/MariaDB
  [pgsql     ] PostgreSQL
  [sqlsrv    ] SQL Server
  [sqlite-e2e] SQLite
 >

Environment

  • Koel version [e.g. v4.1.0] not sure
  • OS: [e.g. macOS Mojave] windows 10
  • Browser [e.g. Chrome 79] brave latest
  • PHP version [e.g. v7.2.0] PHP 7.4.16
  • Node version [e.g. v10.15.3] v13.10.1
Originally created by @yuis-ice on GitHub (Apr 24, 2021). Original GitHub issue: https://github.com/koel/koel/issues/1310 After I followed the guide https://docs.koel.dev/#client , downloaded and unzipped the latest zip, did `composer install`, and tried `php artisan koel:init --no-assets` but I don't quite understand this part. I'd like to tell the Koel to create a new sqlite database and get started with the sqlite file, since I prefer sqlite for its simple accessibility, so I told the prompt "sqlite-e2e" and proceeded but the next prompt asked me "Absolute path to the DB file:", and I typed like "whatevertmp.db" and it failed, apparently the prompt need an existing database file ...? kindly tell me if I missed a concept of Koel. what can I do now? ``` $ php artisan koel:init --no-assets Attempting to install or upgrade Koel. Remember, you can always install/upgrade manually following the guide here: 📙 https://docs.koel.dev App key exists -- skipping could not find driver Koel cannot connect to the database. Let's set it up. Your DB driver of choice [MySQL/MariaDB]: [mysql ] MySQL/MariaDB [pgsql ] PostgreSQL [sqlsrv ] SQL Server [sqlite-e2e] SQLite > ``` **Environment** - Koel version [e.g. v4.1.0] not sure - OS: [e.g. macOS Mojave] windows 10 - Browser [e.g. Chrome 79] brave latest - PHP version [e.g. v7.2.0] PHP 7.4.16 - Node version [e.g. v10.15.3] v13.10.1
kerem closed this issue 2026-02-26 02:34:11 +03:00
Author
Owner

@ghost commented on GitHub (Apr 26, 2021):

I have seen your issue.
That way to solve this problem probably after next.
First, DB Connection making with you can be achieve by CLI "php artisan migrate".
Before CLI you should change DB name and DB propoties in .env of your project for the same of course.( in .env :
DB_DATABASE=your schema name
DB_USERNAME=your DB name
DB_PASSWORD=your DB password)

And next you can create new folder in your mind in your project folder , and cory your new folder Absolute path and
paste to your CLI.
So , all right.
Thank you.

<!-- gh-comment-id:826494978 --> @ghost commented on GitHub (Apr 26, 2021): I have seen your issue. That way to solve this problem probably after next. First, DB Connection making with you can be achieve by CLI "php artisan migrate". Before CLI you should change DB name and DB propoties in .env of your project for the same of course.( in .env : DB_DATABASE=your schema name DB_USERNAME=your DB name DB_PASSWORD=your DB password) And next you can create new folder in your mind in your project folder , and cory your new folder Absolute path and paste to your CLI. So , all right. Thank you.
Author
Owner

@phanan commented on GitHub (Apr 26, 2021):

@kiryanovoselov Thanks, but that's incorrect. What @yuis-ice needs to do would be to create the database beforehand and supply the absolute path during installation. The installation process would then save this info into .env, not the other way around.

<!-- gh-comment-id:826824077 --> @phanan commented on GitHub (Apr 26, 2021): @kiryanovoselov Thanks, but that's incorrect. What @yuis-ice needs to do would be to create the database beforehand and supply the _absolute_ path during installation. The installation process would then save this info into `.env`, not the other way around.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#758
No description provided.