Code Monkey home page Code Monkey logo

Comments (5)

d7415 avatar d7415 commented on August 19, 2024 1

Out of curiosity, which MySQL/MariaDB version are you using?

from lychee.

ildyria avatar ildyria commented on August 19, 2024 1

@jgbellin but you are losing the multi byte version of utf8mb4 which add emojies and cover additional characters: https://stackoverflow.com/a/30074553/3981163
Might be useful for the cn people...

from lychee.

bennettscience avatar bennettscience commented on August 19, 2024

Here's my STATUS dump:

MariaDB [(none)]> status;
--------------
mysql  Ver 15.1 Distrib 10.1.37-MariaDB, for debian-linux-gnueabihf (armv8l) using readline 5.2

Current pager:		stdout
Using outfile:		''
Using delimiter:	;
Server:			MariaDB
Server version:		10.1.37-MariaDB-0+deb9u1 Raspbian 9.0
Protocol version:	10
Connection:		Localhost via UNIX socket
Server characterset:	utf8mb4
Db     characterset:	utf8mb4
Client characterset:	utf8mb4
Conn.  characterset:	utf8mb4

from lychee.

jgbellin avatar jgbellin commented on August 19, 2024

try to edit the /config/database.php file :
at line 50,
repace 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci',
with 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci',
it should work (worked for me)

from lychee.

bennettscience avatar bennettscience commented on August 19, 2024

Ok, finally looping back to this. I removed all Laravel directories and tables. Short of rebuilding the server, I was starting from a blank slate. Running php artisan migrate continues to throw the key error.

In Connection.php line 664:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_username_unique`(`username`))

Following @jgbellin's advice, changing /config/database.php allowed the migration to proceed without error. I don't know enough PHP to debug this one, though.

from lychee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.