• Register
0 votes
41 views

Problem :

Facing migration error on Laravel 5.4 with php artisan make:auth command as follows:

syntax error or access violation: 1071 specified key was too long; max key length is 767 bytes

6 5 3
6,930 points

1 Answer

0 votes

Solution :

I am giving two sollutions those work for me.

1:

  1. Open your database.php file insde your config dir/folder.
  2. Edit your 'engine' => null, to 'engine' => 'InnoDB',

    This worked for me.

2:

  1. Open your database.php file insde config dir/folder.
    2. Edit your
    'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci',
    to

    'charset' => 'utf8', 'collation' => 'utf8_unicode_ci',

This worked for me.
9 7 4
38,600 points

Related questions

0 votes
1 answer 215 views
215 views
Problem : I am trying to learn the pSQL. I recently moved my Laravel App from the MySQL to pSQL. But now I keep on getting below error. “The Response content must be a string or object implementing __toString(), "boolean" given.” I have the API that was returning my promotion before but now it only returns the above error. Can anyone suggest me solution on above error ?
asked Feb 13 mphil 2.3k points
0 votes
1 answer 202 views
202 views
Problem : I am currently using the Mac OS Yosemite and Laravel 5.0. I am new to Laravel 5.0. In the local environment whenever I run the below command php artisan migrate I always encounter below error : “Access denied for user 'homestead'@'localhost' (using password: YES)” I am unable to fix above error. Any clue to fix the above error?
asked Feb 13 mphil 2.3k points
0 votes
1 answer 10 views
10 views
Problem: If I open my error log file then sometimes I see the below error: PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1040] Too many connections' in /home/root/products/db.php:2 Stack trace: /home/root/products/ ... 'root', '**somePassword**'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
asked Aug 8 Raphael Pacheco 4.9k points
0 votes
1 answer 146 views
146 views
Problem : I am getting following error in my error log file [18-Nov-2019 19:09:55 UTC] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1040] Too many connections' in /home/root/products/db.php:2 Stack trace: /home/ ... ', 'root', '**somePassword**'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
asked Nov 20, 2019 peterlaw 6.9k points