First impressions and actions after upgrading MySQL from version 5.7 to 8.0.11

The decision to update the MySQL database was made after I read on the developer’s website that the eighth version introduced more complete support for UTF. In particular, MySQL 8.0.11 uses regular expressions based on ICU, International Components for Unicode.

The first thing to notice is that the boundaries of words in regular expressions can no longer be denoted as:

SELECT'слово' REGEXP '[[:<:]]слово[[:>:]]'; 

The boundaries of the word in the new version are indicated as follows:

'\\bслово\\b'

In addition, LOAD DATA LOCAL INFILE, that is, importing data from a text file on the local computer, stopped working. It turns out that in MySQL 8.0, the global variable local_infile is set to OFF by default. On the developer's site they write that this was done as a security measure. The value of this variable can be viewed with the following command:

SHOWGLOBALVARIABLESLIKE'local_infile';

Solved this problem by running in the terminal:

SETGLOBAL local_infile = true;

That is, it fits in the terminal in MySQL as usual:

mysql -u root -p

and executed the above command.

Just in case, I exported the databases to PHPMyAdmin in SQL format in GZ archives. And did not regret. Just substitute data files from 5.7 to 8.0.11 does not work. The eighth version does not recognize them. And the import of data from SQL files went without comment.

And in general, everything. The rest is all working fine. I can already see that in the eighth version, the regular expressions ICU have wider possibilities, which is important for working with Cyrillic.

Also popular now: