0

In config folder database 'charset' => 'utf8mb4' and 'collation' => 'utf8mb4_unicode_ci' are like that when i am trying to php artisan migrate i get this error message
1 C:\wamp64\www\laravel-project-laracast\blog\vendor\laravel\framework\src\Illuminate\Database\Connection.php:492 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes")

2 C:\wamp64\www\laravel-project-laracast\blog\vendor\laravel\framework\src\Illuminate\Database\Connection.php:492 PDOStatement::execute()

After reading on this 2 links link1 (perfectionist1 answer) link2 I figured it out how to work it for the moment
The problem is that I have changed :
'charset' => 'utf8mb4' into 'charset' => 'utf8'
The problem is that utf8mb4 supports emoji and BMP while the utf8(utf8mb3) it does not support emoji and BMP How do I make my database support utf8mb4 cause right now I get that error message when I use it

Alexandru
  • 45
  • 5
  • 1
    Does this answer your question? [Laravel Migration Error: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes](https://stackoverflow.com/questions/42244541/laravel-migration-error-syntax-error-or-access-violation-1071-specified-key-wa) – Ron van der Heijden Dec 23 '21 at 14:57
  • Is the same link as my link1 – Alexandru Dec 27 '21 at 10:49
  • Also if I try to add 191 default length /app/Providers/AppServiceProvider.php, stored emails can only have a max length of 191 chars. This is less than the official RFC states and I don't want to have any limitations. Since 2017 Laravel has change and maybe there is a batter answer @RonvanderHeijden – Alexandru Dec 27 '21 at 11:01

0 Answers0