• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

Error setting up FusionAuth free version

Scheduled Pinned Locked Moved Solved
Q&A
2
9
1.3k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    nishant
    last edited by 7 Aug 2020, 17:59

    Hi,

    I'm new to FusionAuth and trying to setup the community version. I'm using MySQL 5.6 as my database. I'm unable to complete the initial setup. The logs report the error below:

    Cause: java.sql.SQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes

    The query being executed is this:

    INSERT INTO form_fields (id, data, insert_instant, last_update_instant, name)
      VALUES (SUBSTR(CONCAT(MD5(RAND()), MD5(RAND())), 3, 16), '{"key": "user.email", "control": "text", "required": true, "type": "email", "data": {"leftAddon": "user"}}', FLOOR(UNI
    X_TIMESTAMP(NOW(3)) * 1000), FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000), 'Email'),
      (SUBSTR(CONCAT(MD5(RAND()), MD5(RAND())), 3, 16), '{"key": "user.password", "control": "password", "required": true, "type": "string", "data": {"leftAddon": "lock"}}', FLOOR(UN
    IX_TIMESTAMP(NOW(3)) * 1000), FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000), 'Password'),
      (SUBSTR(CONCAT(MD5(RAND()), MD5(RAND())), 3, 16), '{"key": "user.firstName", "control": "text", "required": false, "type": "string", "data": {"leftAddon": "info"}}', FLOOR(UNIX
    _TIMESTAMP(NOW(3)) * 1000), FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000), 'First name'),
      (SUBSTR(CONCAT(MD5(RAND()), MD5(RAND())), 3, 16), '{"key": "user.middleName", "control": "text", "required": false, "type": "string", "data": {"leftAddon": "info"}}', FLOOR(UNI
    X_TIMESTAMP(NOW(3)) * 1000), FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000), 'Middle name'),
      (SUBSTR(CONCAT(MD5(RAND()), MD5(RAND())), 3, 16), '{"key": "user.lastName", "control": "text", "required": false, "type": "string", "data": {"leftAddon": "info"}}', FLOOR(UNIX_
    TIMESTAMP(NOW(3)) * 1000), FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000), 'Last name'),
      (SUBSTR(CONCAT(MD5(RAND()), MD5(RAND())), 3, 16), '{"key": "user.fullName", "control": "text", "required": false, "type": "string", "data": {"leftAddon": "info"}}', FLOOR(UNIX_
    TIMESTAMP(NOW(3)) * 1000), FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000), 'Full name'),
      (SUBSTR(CONCAT(MD5(RAND()), MD5(RAND())), 3, 16), '{"key": "user.birthDate", "control": "text", "required": false, "type": "date", "data": {"leftAddon": "calendar"}}', FLOOR(UN
    IX_TIMESTAMP(NOW(3)) * 1000), FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000), 'Birthdate'),
      (SUBSTR(CONCAT(MD5(RAND()), MD5(RAND())), 3, 16), '{"key": "user.mobilePhone", "control": "text", "required": false, "type": "string", "data": {"leftAddon": "mobile"}}', FLOOR(
    UNIX_TIMESTAMP(NOW(3)) * 1000), FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000), 'Mobile phone'),
      (SUBSTR(CONCAT(MD5(RAND()), MD5(RAND())), 3, 16), '{"key": "user.username", "control": "text", "required": true, "type": "string", "data": {"leftAddon": "user"}}', FLOOR(UNIX_T
    IMESTAMP(NOW(3)) * 1000), FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000), 'Username');
    

    Looks like the issue is related to this question, and I did notice that the name column in the form_fields is of type varchar(191) and the character set being used is utf8mb4. One of the resolutions is to use a max length of 190. I can't change the FusionAuth code. Has anyone faced this issue? Is there a known resolution or alternatively how do I solve this? Appreciate any help.

    Thanks,
    -N.

    1 Reply Last reply Reply Quote 0
    • D
      dan
      last edited by 7 Aug 2020, 18:09

      Hiya,

      The minimum version of mysql for FusionAuth is 5.7.9. This and other system requirements are documented here: https://fusionauth.io/docs/v1/tech/installation-guide/system-requirements

      Any chance you can upgrade mysql or use postgresql 9.5+?

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 0
      • N
        nishant
        last edited by 7 Aug 2020, 18:29

        Hi Dan,

        Thanks for the quick response! Yes I'll look into upgrading MySQL.

        Cheers,
        -N

        1 Reply Last reply Reply Quote 1
        • D
          dan
          last edited by 7 Aug 2020, 23:25

          Great! If you end up sticking with mysql, make sure you check out this:

          https://fusionauth.io/community/forum/topic/109/what-are-the-implications-of-turning-off-enforce-utf8mb4-for-mysql

          and the database.mysql.enforce-utf8mb4 section of https://fusionauth.io/docs/v1/tech/reference/configuration

          --
          FusionAuth - Auth for devs, built by devs.
          https://fusionauth.io

          1 Reply Last reply Reply Quote 1
          • D
            dan
            last edited by 10 Aug 2020, 14:37

            @nishant did you get this working?

            --
            FusionAuth - Auth for devs, built by devs.
            https://fusionauth.io

            1 Reply Last reply Reply Quote 0
            • N
              nishant
              last edited by 10 Aug 2020, 17:49

              @dan thanks for following up! Yes I upgraded our database to 5.7 with the correct options for character set and I was able to setup FusionAuth app as well as setup a sample app to demonstrate the login/logout functionality. Will dig into registering new users, password management etc. If you have some resources for creating a custom theme please do share. Thanks again!

              1 Reply Last reply Reply Quote 0
              • D
                dan
                last edited by 10 Aug 2020, 17:54

                Hiya,

                This is probably the best resource for themes: https://fusionauth.io/docs/v1/tech/themes/

                The video is a bit out of date in terms of where you go in the admin interface, but the functionality is much the same.

                Cheers!

                --
                FusionAuth - Auth for devs, built by devs.
                https://fusionauth.io

                1 Reply Last reply Reply Quote 1
                • N
                  nishant
                  last edited by 10 Aug 2020, 17:57

                  Thanks! 🙂 🙌

                  1 Reply Last reply Reply Quote 1
                  • D
                    dan
                    last edited by 10 Aug 2020, 20:06

                    Great. Marking this solved. Let me know if that's not ok 🙂 .

                    --
                    FusionAuth - Auth for devs, built by devs.
                    https://fusionauth.io

                    1 Reply Last reply Reply Quote 1
                    7 out of 9
                    • First post
                      7/9
                      Last post