Closed rimas-kudelis closed 8 years ago
On mysql 5.5.50 (ubuntu 14.04), I get this error:
ERROR 1267 (HY000) at line 218: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'concat'
Would you try again please?
Still the same error ;-(
This works for this setup:
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);
Thank you, adjusted. Let's see how it goes now.
Works now on 5.5.30 (ubuntu 14.04) and 5.6.30 (FreeBSD 10.1).
The
TO_BASE64()
function was only added in MySQL 5.6.1. This changes the way siteadmin password is generated. On older versions of MySQL, uppercase-only password will be generated. On 5.6.1 and above, it will be mixed-case as previously.Fixes #212