Node.js can’t authenticate to MySQL 8.0

MySQL 8.0 uses a new default authentication plugin – caching_sha2_password – whereas MySQL 5.7 used a different one – mysql_native_password. Currently, the community Node.js drivers for MySQL don’t support compatible client-side authentication mechanisms for the new server plugin. A possible workaround is to alter the type of user account to use the old authentication plugin: … Read more

MySQL MONTHNAME() from numbers

You can use STR_TO_DATE() to convert the number to a date, and then back with MONTHNAME() SELECT MONTHNAME(STR_TO_DATE(6, ‘%m’)); +———————————+ | MONTHNAME(STR_TO_DATE(6, ‘%m’)) | +———————————+ | June | +———————————+ Warning: This could be slow if done over a lot of rows.

#1139 – Got error ‘repetition-operator operand invalid’ from regexp

According to the MySQL manual MySQL uses Henry Spencer’s implementation of regular expressions, which is aimed at conformance with POSIX 1003.2 POSIX regexes don’t support using the question mark ? as a non-greedy (lazy) modifier to the star and plus quantifiers like PCRE (Perl Compatible Regular Expressions). This means you can’t use +? and *? … Read more