[GH-ISSUE #1733] Can't install - SQL errors #952

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

Originally created by @jSML4ThWwBID69YC on GitHub (Dec 28, 2023).
Original GitHub issue: https://github.com/koel/koel/issues/1733

Describe the bug
Run the standard installer script.

php artisan koel:init --no-assets

It fails during the Mysql migration.

To reproduce
Steps to reproduce the behavior:

  1. Download and unzip Koel
  2. Run composer install
  3. Run php artisan koel:init --no-assets
  4. Fill out Mysql information and continue

See error message:

Migrating database ..................................................................................................................... 45ms FAIL ERROR Oops! Koel installation or upgrade didn't finish successfully.

Database error:
2023-12-28 19:42:22 2 [ERROR] Slave SQL: Error 'Table 'migrations' already exists' on query. Default database: 'CENSORED'. Query: 'create tablemigrations (idint unsigned not null auto_increment primary key,migrationvarchar(191) not null,batchint not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'', Internal MariaDB error code: 1050 2023-12-28 19:42:22 2 [Warning] WSREP: Ignoring error 'Table 'migrations' already exists' on query. Default database: 'CENSORED'. Query: 'create tablemigrations (idint unsigned not null auto_increment primary key,migrationvarchar(191) not null,batchint not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'', Error_code: 1050

Laravel log
Next Illuminate\Database\QueryException: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'migrations' already exists (SQL: create tablemigrations (idint unsigned not null auto_increment primary key,migrationvarcha r(191) not null,batchint not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') in /apps/koel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760

Expected behavior
Migration should succeed.

Environment

  • Koel version 6.11.5
  • OS: FreeBSD
  • Browser Firefox
  • PHP version 8.1
  • MariaDB 10.11.6 with Galera

Additional context
This is a new SQL error after the fix for https://github.com/koel/koel/issues/1725

Originally created by @jSML4ThWwBID69YC on GitHub (Dec 28, 2023). Original GitHub issue: https://github.com/koel/koel/issues/1733 **Describe the bug** Run the standard installer script. `php artisan koel:init --no-assets` It fails during the Mysql migration. **To reproduce** Steps to reproduce the behavior: 1. Download and unzip Koel 2. Run `composer install` 3. Run `php artisan koel:init --no-assets` 4. Fill out Mysql information and continue See error message: ` Migrating database ..................................................................................................................... 45ms FAIL ERROR Oops! Koel installation or upgrade didn't finish successfully. ` Database error: ` 2023-12-28 19:42:22 2 [ERROR] Slave SQL: Error 'Table 'migrations' already exists' on query. Default database: 'CENSORED'. Query: 'create table `migrations` (`id` int unsigned not null auto_increment primary key, `migration` varchar(191) not null, `batch` int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'', Internal MariaDB error code: 1050 2023-12-28 19:42:22 2 [Warning] WSREP: Ignoring error 'Table 'migrations' already exists' on query. Default database: 'CENSORED'. Query: 'create table `migrations` (`id` int unsigned not null auto_increment primary key, `migration` varchar(191) not null, `batch` int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'', Error_code: 1050 ` Laravel log ` Next Illuminate\Database\QueryException: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'migrations' already exists (SQL: create table `migrations` (`id` int unsigned not null auto_increment primary key, `migration` varcha r(191) not null, `batch` int not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') in /apps/koel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760 ` **Expected behavior** Migration should succeed. **Environment** - Koel version 6.11.5 - OS: FreeBSD - Browser Firefox - PHP version 8.1 - MariaDB 10.11.6 with Galera **Additional context** This is a new SQL error after the fix for https://github.com/koel/koel/issues/1725
kerem closed this issue 2026-02-26 02:34:44 +03:00
Author
Owner

@phanan commented on GitHub (Dec 29, 2023):

Try truncating your database first, as I have a hunch this is some leftover from your previous tries.

<!-- gh-comment-id:1871854620 --> @phanan commented on GitHub (Dec 29, 2023): Try truncating your database first, as I have a hunch this is some leftover from your previous tries.
Author
Owner

@jSML4ThWwBID69YC commented on GitHub (Dec 29, 2023):

I believe you're right. Thank you.

<!-- gh-comment-id:1872218404 --> @jSML4ThWwBID69YC commented on GitHub (Dec 29, 2023): I believe you're right. Thank you.
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#952
No description provided.