[GH-ISSUE #1705] Can't find MySQL database on rpi? #935

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

Originally created by @FailurePoint on GitHub (Sep 9, 2023).
Original GitHub issue: https://github.com/koel/koel/issues/1705

Hi there everyone, I have been trying to install koel server on my raspberry pi for the last few days and have come a long way but I keep getting stuck on the init process, running "sudo php artisan koel:init" I get the configuration wizard which then tells me it can't find the data base. Great so far, I have not told it where that data base is yet, So I point it at the database I made for koel in mySQL with the correct username and password on localhost which I can connect to with maradb monitor and leave the port default (blank) and hit enter. Nothing... about 10 seconds later (I think the delay is just because my pi is a older model) it respons with:

WARN 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

What is up? Did I miss something? I tried from source and from the zip file.
This database and user is correctly filled out and I can reach it from maradb monitor from the command line on localhost... I have no firewall on the pi since it is a Lan only server, and mySQL is configured to accept on localhost...
Please help!

My setup:
Ras pi 3b+ 2 GB ram.
MySQL database from maradb.
Apache2 server.
Over the Lan on my starlink router.
Everything is configured as default.

Not sure if it helps any but my web root directory is "/var/www/html/" and koel is at "/var/www/html/koel/koel/"

I also posted this in discussions, I was not sure where it was more appropriate. Sorry.

Originally created by @FailurePoint on GitHub (Sep 9, 2023). Original GitHub issue: https://github.com/koel/koel/issues/1705 Hi there everyone, I have been trying to install koel server on my raspberry pi for the last few days and have come a long way but I keep getting stuck on the init process, running "sudo php artisan koel:init" I get the configuration wizard which then tells me it can't find the data base. Great so far, I have not told it where that data base is yet, So I point it at the database I made for koel in mySQL with the correct username and password on localhost which I can connect to with maradb monitor and leave the port default (blank) and hit enter. Nothing... about 10 seconds later (I think the delay is just because my pi is a older model) it respons with: WARN 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 What is up? Did I miss something? I tried from source and from the zip file. This database and user is correctly filled out and I can reach it from maradb monitor from the command line on localhost... I have no firewall on the pi since it is a Lan only server, and mySQL is configured to accept on localhost... Please help! My setup: Ras pi 3b+ 2 GB ram. MySQL database from maradb. Apache2 server. Over the Lan on my starlink router. Everything is configured as default. Not sure if it helps any but my web root directory is "/var/www/html/" and koel is at "/var/www/html/koel/koel/" I also posted this in discussions, I was not sure where it was more appropriate. Sorry.
kerem closed this issue 2026-02-26 02:34:41 +03:00
Author
Owner

@patrick-motard commented on GitHub (Jan 4, 2024):

When I was installing Koel with Docker and Postgres I ran into an issue where php artisan koel:init --no-assets during the initial setup was failing to connect to Postgres. This issue lead me to the solution. Postgres uses port 5432 as it's default while MySQL and MariaDB use 3306 as their default. Koel defaults to 3306 when Postgress env vars are set. I would assume that it attempts to use 3306 all the time, but it wouldn't hurt to set the environment variable for this port explicitly to rule it out when you're attempting to connect.

<!-- gh-comment-id:1877472237 --> @patrick-motard commented on GitHub (Jan 4, 2024): When I was installing Koel with Docker and Postgres I ran into an issue where `php artisan koel:init --no-assets` during the initial setup was failing to connect to Postgres. [This issue lead me to the solution](https://github.com/koel/docker/issues/168). Postgres uses port 5432 as it's default while MySQL and MariaDB use 3306 as their default. Koel defaults to 3306 when Postgress env vars are set. I would assume that it attempts to use 3306 all the time, but it wouldn't hurt to set the environment variable for this port explicitly to rule it out when you're attempting to connect.
Author
Owner

@FailurePoint commented on GitHub (Jan 29, 2024):

I just used Navidrome(subsonic) and the Symphonium client instead :)
But thanks.

<!-- gh-comment-id:1913958335 --> @FailurePoint commented on GitHub (Jan 29, 2024): I just used Navidrome(subsonic) and the Symphonium client instead :) But thanks.
Author
Owner

@ruhqersa commented on GitHub (Feb 20, 2024):

I'm getting the same error. Did you solve the problem?

<!-- gh-comment-id:1955042913 --> @ruhqersa commented on GitHub (Feb 20, 2024): I'm getting the same error. Did you solve the problem?
Author
Owner

@phanan commented on GitHub (Jul 15, 2024):

Closing due to inactivity.

<!-- gh-comment-id:2228076245 --> @phanan commented on GitHub (Jul 15, 2024): Closing due to inactivity.
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#935
No description provided.