Error 1071 - Fresh install 4.2.5.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • geiri
    Senior Member
    • Feb 2004
    • 296
    • 4.0.x

    Error 1071 - Fresh install 4.2.5.

    I have tried most fixes I have found here but nothing seams to work..

    I am getting This error

    Server info:
    • Server: Localhost via UNIX socket
    • Server type: MariaDB
    • Server version: 10.0.32-MariaDB-0+deb8u1 - (Debian)
    • Server charset: UTF-8 Unicode (utf8)

      Server Type Linux
      Web Server Apache
      PHP 7.0.27-1~dotdeb+8.1



    Code:
    An error has occurred with your database. Please contact vBulletin Support for assistance.
    
    Module: install, Step 2 Database Error:1071
    
    Specified key was too long; max key length is 767 bytes
    
    Query: 
     CREATE TABLE vb5_adcriteria ( 	adid INT UNSIGNED NOT NULL DEFAULT '0', 	criteriaid VARCHAR(250) NOT NULL DEFAULT '', 	condition1 VARCHAR(250) NOT NULL DEFAULT '', 	condition2 VARCHAR(250) NOT NULL DEFAULT '', 	condition3 VARCHAR(250) NOT NULL DEFAULT '', 	PRIMARY KEY (adid,criteriaid) )
  • djbaxter
    Senior Member
    • Aug 2006
    • 1418
    • 4.2.5

    #2


    See in particular https://stackoverflow.com/questions/...google_rich_qa
    Psychlinks Web Services Affordable Web Design & Site Management
    Specializing in Small Businesses and vBulletin/Xenforo Forums

    Comment

    • geiri
      Senior Member
      • Feb 2004
      • 296
      • 4.0.x

      #3
      I am not much of a guru tho I can usually manage. Has any one altered the "mysql-schema.php" file, got this to work and is willing to share?
      I need this just so I can Install an old site and overwrite it with 5 keeping all the translations

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 74123

        #4
        Change the length of the criteriaid field to 191 characters in your mysql-schema.php file and reinstall.

        The issue is caused when using UTF-8 character sets on INNODB tables. A UTF-8 character is actually 2-4 bytes of space compared to a single byte in the ASCII space. So when you have a field that is 250 characters, it needs up to 1001 bytes for storage. The final byte is the terminator. When vBulletin 4 was created, using UTF-8 in the database wasn't common and you were limited on the size of a varchar. Now neither of those are true. All new installs of MySQL assume UTF-8 and varchars can be much longer, within limits of the page size of the storage table. InnoDB is also the default table storage compared to the outdated MyISAM format which doesn't have this limit but adds many other limitations.
        Last edited by Wayne Luke; Tue 10 Apr '18, 2:03pm.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • lhitson
          New Member
          • Apr 2011
          • 1
          • 4.1.x

          #5
          I changed it to 191, but when i reinstall it still gives the error stating that 250 is still there. I double checked the file on the server and it shows 191 for that field. I've been out of the vbulletin game for quite some time so I'm unsure what's going on.

          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 74123

            #6
            Then you will need to have your hosting provider set the innodb_large_prefix variable to On in MySQL. This should be on by default in the latest versions of MySQL and is actually being removed so it can't be turned off in the future.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            Related Topics

            Collapse

            Working...