{"id":7890,"date":"2021-08-13T06:34:44","date_gmt":"2021-08-13T06:34:44","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=7890"},"modified":"2021-08-13T06:34:46","modified_gmt":"2021-08-13T06:34:46","slug":"artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/","title":{"rendered":"Artifactory Error &#8211; Error 1071: Specified key was too long; max key length is 3072 bytes"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Error<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@localhost log]# more metadata-service.log | grep -i error\r\n2021-08-13T05:50:35.245Z &#91;jfmd ] &#91;WARN ] &#91;1b5644480c9d339f] &#91;migrator.go:201               ] &#91;main                ] - This error occurred when upgrading the database : 'Error 1071: Specified key was too long; max key length is 3072 bytes'.  &#91;database]\r\n2021-08-13T05:50:35.247Z &#91;jfmd ] &#91;ERROR] &#91;1b5644480c9d339f] &#91;migrator.go:194               ] &#91;main                ] - Migration v038_file_targets.sql failed ! Rollback to latest successful migration. Err: Error 1071: Specified key was too long; max key length is 3072 bytes. Panic : &lt;nil> &#91;database]\r\n2021-08-13T05:50:35.248Z &#91;jfmd ] &#91;PANIC] &#91;1b5644480c9d339f] &#91;application.go:89             ] &#91;main                ] - Could not execute database migrations Error 1071: Specified key was too long; max key length is 3072 bytes\r\n\r\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>--------------------- THIS WORKED----------------------------\r\n$ mysql -h localhost -u root -p\r\nCREATE DATABASE artdb CHARACTER SET utf8 COLLATE utf8_bin;\r\nCREATE USER 'artifactory1'@'%' IDENTIFIED BY 'password';\r\nGRANT ALL on artdb.* TO 'artifactory1'@'%';\r\nFLUSH PRIVILEGES;\r\n--------------------- THIS WORKED----------------------------<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Some Troubleshooting Commands to Check this Error<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>SET GLOBAL default_storage_engine = 'InnoDB'\r\nSET GLOBAL default_storage_engine = 'InnoDB';\r\nUSE &lt;database>;\r\nSHOW TABLE STATUS\\G\r\n\r\nALTER TABLE md_database_migrations CHARACTER SET utf8 COLLATE utf8_general_ci;\r\nALTER TABLE md_database_migrations CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;\r\n\r\nALTER DATABASE databasename CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\r\nALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\r\n\r\nALTER DATABASE artifactory CHARACTER SET utf8 COLLATE utf8_bin;\r\nuse artifactory;\r\nALTER TABLE md_database_migrations CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">Reference<\/h1>\n\n\n\n<ul class=\"wp-block-list\"><li>https:\/\/confluence.atlassian.com\/fisheye\/migrating-to-mysql-960155589.html<\/li><li>https:\/\/www.jfrog.com\/jira\/si\/jira.issueviews:issue-html\/RTFACT-24896\/RTFACT-24896.html<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Error Solution Some Troubleshooting Commands to Check this Error Reference https:\/\/confluence.atlassian.com\/fisheye\/migrating-to-mysql-960155589.html https:\/\/www.jfrog.com\/jira\/si\/jira.issueviews:issue-html\/RTFACT-24896\/RTFACT-24896.html<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7890","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Artifactory Error - Error 1071: Specified key was too long; max key length is 3072 bytes - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Artifactory Error - Error 1071: Specified key was too long; max key length is 3072 bytes - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Error Solution Some Troubleshooting Commands to Check this Error Reference https:\/\/confluence.atlassian.com\/fisheye\/migrating-to-mysql-960155589.html https:\/\/www.jfrog.com\/jira\/si\/jira.issueviews:issue-html\/RTFACT-24896\/RTFACT-24896.html\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-13T06:34:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-13T06:34:46+00:00\" \/>\n<meta name=\"author\" content=\"rajeshkumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rajeshkumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\\\/\"},\"author\":{\"name\":\"rajeshkumar\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"headline\":\"Artifactory Error &#8211; Error 1071: Specified key was too long; max key length is 3072 bytes\",\"datePublished\":\"2021-08-13T06:34:44+00:00\",\"dateModified\":\"2021-08-13T06:34:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\\\/\"},\"wordCount\":43,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\\\/\",\"name\":\"Artifactory Error - Error 1071: Specified key was too long; max key length is 3072 bytes - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"datePublished\":\"2021-08-13T06:34:44+00:00\",\"dateModified\":\"2021-08-13T06:34:46+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Artifactory Error &#8211; Error 1071: Specified key was too long; max key length is 3072 bytes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\",\"name\":\"rajeshkumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"caption\":\"rajeshkumar\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/rajeshkumar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Artifactory Error - Error 1071: Specified key was too long; max key length is 3072 bytes - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/","og_locale":"en_US","og_type":"article","og_title":"Artifactory Error - Error 1071: Specified key was too long; max key length is 3072 bytes - scmGalaxy","og_description":"Error Solution Some Troubleshooting Commands to Check this Error Reference https:\/\/confluence.atlassian.com\/fisheye\/migrating-to-mysql-960155589.html https:\/\/www.jfrog.com\/jira\/si\/jira.issueviews:issue-html\/RTFACT-24896\/RTFACT-24896.html","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/","og_site_name":"scmGalaxy","article_published_time":"2021-08-13T06:34:44+00:00","article_modified_time":"2021-08-13T06:34:46+00:00","author":"rajeshkumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rajeshkumar","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/"},"author":{"name":"rajeshkumar","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"headline":"Artifactory Error &#8211; Error 1071: Specified key was too long; max key length is 3072 bytes","datePublished":"2021-08-13T06:34:44+00:00","dateModified":"2021-08-13T06:34:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/"},"wordCount":43,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/","name":"Artifactory Error - Error 1071: Specified key was too long; max key length is 3072 bytes - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"datePublished":"2021-08-13T06:34:44+00:00","dateModified":"2021-08-13T06:34:46+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/artifactory-error-error-1071-specified-key-was-too-long-max-key-length-is-3072-bytes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Artifactory Error &#8211; Error 1071: Specified key was too long; max key length is 3072 bytes"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361","name":"rajeshkumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","caption":"rajeshkumar"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/rajeshkumar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7890","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=7890"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7890\/revisions"}],"predecessor-version":[{"id":7891,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7890\/revisions\/7891"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=7890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=7890"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=7890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}