Project

General

Profile

Tâche #29485

Scénario #29463: Préparer la version EOLE 2.8.0

Faire fonctionner MySQL sur EOLE 2.8.0

Added by Joël Cuissinat over 3 years ago. Updated over 3 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
01/21/2020
Due date:
% Done:

100%

Remaining (hours):
0.0

Related issues

Related to Distribution EOLE - Scénario #29559: Corriger la mise en place de Bareos sur EOLE 2.8.0 Terminé (Sprint) 03/09/2020 03/20/2020

Associated revisions

Revision b5c15ceb (diff)
Added by Joël Cuissinat over 3 years ago

eoleaaf : remove table update specific code

Ref: #29485

Revision 7c028af8 (diff)
Added by Joël Cuissinat over 3 years ago

mysql_pwd.py : modify mysql password change commands for MySQL 8.0

Ref: #29485

Revision cec689f7 (diff)
Added by Joël Cuissinat over 3 years ago

Remove obsolete "NO_AUTO_CREATE_USER" SQL mode

Ref: #29485

Revision a1dbe5e0 (diff)
Added by Joël Cuissinat over 3 years ago

22_mysql.xml : temporary ignore mysqld.cnf template

Ref: #29485
Ref: #29498

Revision 6b11dc72 (diff)
Added by Joël Cuissinat over 3 years ago

eoleaaf : upgrade MySQL commands for EOLE 2.8.0

Ref: #29485

Revision c2eef020 (diff)
Added by Joël Cuissinat over 3 years ago

mysql_add.py : modify mysql password change commands for MySQL 8.0

Ref: #29485

Revision f4d94346 (diff)
Added by Joël Cuissinat over 3 years ago

controlevnc.sql : modify mysql password change commands for MySQL 8.0

Ref: #29485

Revision 3aff4cb4 (diff)
Added by Joël Cuissinat over 3 years ago

Temporarily remove "lower_case_table_names" from capti.cnf

Ref: #29485
Ref: #29498

History

#1 Updated by Joël Cuissinat over 3 years ago

  • Status changed from Nouveau to En cours
  • Assigned To set to Joël Cuissinat
root@thot:~# tail -f /var/log/rsyslog/local/mysql-systemd-start/mysql-systemd-start.info.log
2020-01-21T10:25:37.517853+01:00 thot.ac-test.fr mysql-systemd-start[10282]: ERROR: Unable to start MySQL server:
2020-01-21T10:25:37.517985+01:00 thot.ac-test.fr mysql-systemd-start[10282]: 2020-01-21T09:25:37.510018Z 0 [ERROR] [MY-000077] [Server] /usr/sbin/mysqld: Error while setting value 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' to 'sql_mode'.
2020-01-21T10:25:37.518049+01:00 thot.ac-test.fr mysql-systemd-start[10282]: 2020-01-21T09:25:37.513954Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-01-21T10:25:37.518120+01:00 thot.ac-test.fr mysql-systemd-start[10282]: Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues.
2020-01-21T10:25:37.518188+01:00 thot.ac-test.fr mysql-systemd-start[10282]: Once the problem is resolved, restart the service.

D'après https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html#mysql-nutshell-deprecations :

Using GRANT to create users. Instead, use CREATE USER. Following this practice makes the NO_AUTO_CREATE_USER SQL mode immaterial for GRANT statements, so it too is removed, and an error now is written to the server log when the presence of this value for the sql_mode option in the options file prevents mysqld from starting.

#2 Updated by Joël Cuissinat over 3 years ago

Malgré cette correction, ça ne démarre toujours pas...

En supprimant le fichier/template /etc/mysql/mysql.conf.d/mysqld.cnf, ça passe, il faudra mettre à niveau ce fichier !

#3 Updated by Joël Cuissinat over 3 years ago

Sinon, la syntaxe pour le changement de mot de passe a encore évolué...
Cf. https://stackoverflow.com/questions/50691977/how-to-reset-the-root-password-in-mysql-8-0-11#51186648

# mysql --defaults-file=/etc/mysql/debian.cnf mysql
mysql> UPDATE user SET authentication_string=PASSWORD('burp545') WHERE user='root';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('burp545') WHERE user='root'' at line 1

  • dans /usr/share/eole/sbin/mysql_pwd.py, modifier (NB : vérifier l'hôte ?) :
    SQL_CODE="""ALTER USER IF EXISTS '{1}'@'localhost' IDENTIFIED BY '{0}';
    flush  privileges;""" 
    
  • dans /usr/share/eole/applications/gen/eoleaaf.py (exemple) :
        db_handler.simple_query("CREATE DATABASE eoleaaf CHARACTER SET utf8;")
        db_handler.simple_query("CREATE USER IF NOT EXISTS 'eoleaaf'@'localhost';")
        db_handler.simple_query("GRANT ALL PRIVILEGES ON eoleaaf.* to 'eoleaaf'@'localhost';")
        db_handler.simple_query("USE eoleaaf ;")
    

#4 Updated by Joël Cuissinat over 3 years ago

Visiblement le mot clé MEMBER n'est plus autorisé...

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'member TEXT,

Mais ça devrait (re)changer avec la version 8.0.19 : https://dev.mysql.com/doc/refman/8.0/en/keywords.html

#5 Updated by Joël Cuissinat over 3 years ago

  • Status changed from En cours to Résolu
  • % Done changed from 0 to 100

#6 Updated by Joël Cuissinat over 3 years ago

  • Status changed from Résolu to En cours

#7 Updated by Joël Cuissinat over 3 years ago

  • Related to Scénario #29559: Corriger la mise en place de Bareos sur EOLE 2.8.0 added

#8 Updated by Joël Cuissinat over 3 years ago

  • Status changed from En cours to Résolu

#9 Updated by Joël Cuissinat over 3 years ago

  • Status changed from Résolu to En cours

#10 Updated by Joël Cuissinat over 3 years ago

C'est pas encore ça sur Horus :

2020-02-05T14:06:21.201738Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19-0ubuntu2) starting as process 5821
2020-02-05T14:06:21.996282Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('1') and data dictionary ('0').
2020-02-05T14:06:21.996897Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2020-02-05T14:06:21.997341Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-02-05T14:06:22.519504Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19-0ubuntu2)  (Ubuntu).
2020-02-05T14:06:23.241337Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.

Visiblement, on ne peut plus passer "lower_case_table_names" à 1 sans tout réinitialiser : https://stackoverflow.com/questions/53103588/lower-case-table-names-1-on-ubuntu-18-04-doesnt-let-mysql-to-start

#11 Updated by Joël Cuissinat over 3 years ago

  • Status changed from En cours to Résolu

#12 Updated by Joël Cuissinat over 3 years ago

  • Status changed from Résolu to En cours

#13 Updated by Joël Cuissinat over 3 years ago

  • Status changed from En cours to Résolu

#14 Updated by Joël Cuissinat over 3 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) set to 0.0

Also available in: Atom PDF