Skip to content

MySQL setup script does not work with Mysql 8.0 and above #306

Description

@rimas-kudelis

MySQL 5.7 was the last MySQL version to support the ENCRYPT() function. We currently call this function in two places:

  • SET `crypt` = COALESCE(ENCRYPT(`clear`, CONCAT(@NEW_PW_PREFIX, MD5(RAND()))), `crypt`)
    WHERE `crypt` = ENCRYPT(`clear`, `crypt`) AND @NEW_PW_PREFIX IS NOT NULL;
  • INSERT INTO `users` VALUES (1,1,'siteadmin','siteadmin',ENCRYPT(@SITE_ADMIN_PW,CONCAT(@PW_PREFIX,CONVERT(MD5(RAND()) USING utf8))),65535,65535,'','','site',1,0,0,0,0,0,0,0,1,NULL,NULL,0,0,0,'SiteAdmin',0,0,NULL,NULL);

The former is an old migration script. I hope nobody uses pre-2.3 VExim anymore, but if they do, well, I guess it's fair to ask that they run that migration script using MySQL 5.7. A note of caution in the migration script wouldn't hurt though.

Meanwhile the latter is our setup script, and it sucks that it fails. I guess the best way to fix it is to fall back to a predefined password again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions