mirror of
https://github.com/koel/koel.git
synced 2026-04-26 09:15:59 +03:00
[GH-ISSUE #552] Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes #393
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#393
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cllorca on GitHub (Mar 7, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/552
I couldn't find this issue in the troubleshooting section of the documentation, nor could I find it here in the git issue tracker. I followed the steps for installation according to installation guide: https://koel.phanan.net/docs/#/?id=installation
composer.phar executed fine. Then I added my db credentials to .env. Finally when I ran php artisan koel:init' I got the following error which halts the installation as the database seeding fails:
php artisan koel:init
Attempting to install or upgrade Koel.
Remember, you can always install/upgrade manually following the guide here:
📙 https://koel.phanan.net/docs
App key exists -- skipping
JWT secret exists -- skipping
Migrating database
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table
usersadd uniqueusers_email_unique(e mail))php: php --version
PHP 7.0.15 (cli) (built: Jan 19 2017 21:35:05) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.15, Copyright (c) 1999-2017, by Zend Technologies
[edit: this is on an Ubuntu Linode VPS machine]
[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
Any help would be greatly appreciated. A quick web search said this is likely caused by the database type being InnoDB and not MyISAM? I couldn't find anywhere in the configs to change the db type.
@phanan commented on GitHub (Mar 8, 2017):
Have you tried the fix here: #542?
@Nev3rGiveUp commented on GitHub (Mar 11, 2017):
I tried the suggestion from #542 but I still have the problem because I don't know in what file what to change actually... I'm not an expert, I managed to change it into the file *_create_users_table.php and *_create_artists_table.php but I still get this error while running "php artisan koel:init":
http://image.prntscr.com/image/b5021224bb6a47fcaa6918e987d1a704.png
@Andy-H-Nguyen commented on GitHub (Mar 23, 2017):
Hmm I have this issue when I switch to
master. Butv3.5.5works just fine.@Andy-H-Nguyen commented on GitHub (Mar 23, 2017):
A workaround is to
php artisan koel:initv3.5.5first, then switch tomasterand then usephp artisan koel:init@cllorca commented on GitHub (Mar 24, 2017):
Thanks for the tips. I've been offline a few weeks but I'll try and get a fresh vps online and try deploying Koel again. Will report back any success or failure. Thanks
@Andy-H-Nguyen commented on GitHub (Mar 24, 2017):
You should be using
v3.5.5anyways as it is stable and easier to set-up.masteratm doesn't work without a couple of additional steps.@cllorca commented on GitHub (Mar 24, 2017):
I will init 3.5.5 then when I get there. Thanks!
@ghost commented on GitHub (Mar 24, 2017):
@cllorca see my comments on #542; the workaround for this problem is a relatively simple change.
@phanan - I'm not great with the world of PHP; is there a way to check the Laravel version during the initalization in
/path/to/koel/app/Providers/App/AppServiceProvider.php? If there is, this could be fixed by simply updating thebootfunction to set the default string length when the Laravel version is newer than the version supported.EDIT: I meant Illuminate, not Laravel.