cloudpods icon indicating copy to clipboard operation
cloudpods copied to clipboard

[BUG] incompatible with MySQL 8.0

Open swordqiu opened this issue 2 years ago • 4 comments

问题描述/What happened: Install with database of MySQL 8.0, operator error occurs when creating user:

Grant user keystone@% to database keystone: Error 1064: 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 'IDENTIFIED BY 'XfT5g665p5yj36a4'' at line 1, requeuing

环境/Environment:

  • OS (e.g. cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Host: (e.g. dmidecode | egrep -i 'manufacturer|product' |sort -u)
  • Service Version (e.g. kubectl exec -n onecloud $(kubectl get pods -n onecloud | grep climc | awk '{print $1}') -- climc version-list):

swordqiu avatar Nov 26 '23 07:11 swordqiu

@swordqiu 收到。即将测试对 MySQL 8.0 的兼容性:

  • 默认仍只安装 mariadb (而非mysql) 作为 db server;
  • 对于用户输入的MySQL 8.0 的环境,做链接、grant等测试。但不安装mysql;

zhasm avatar Nov 26 '23 10:11 zhasm

MySQL 8.0 的兼容性,需要operator 以及 ocboot 共同进行支持。后续会陆续实现。本issue可以先关闭。

zhasm avatar Dec 07 '23 14:12 zhasm

用这个issue来记录mysql 8不兼容的问题

swordqiu avatar Jan 03 '24 08:01 swordqiu

目前已知问题:

  1. 默认生成的密码没包含特殊字符,导致不符合mysql8默认配置,暂时先通过设置mysql密码策略解决
  2. 部分sql没用full group,建议这块sql调整下,暂时使用配置sql_mode解决
  3. 创建sql用户和授权合并成一个grant语句,导致不兼容mysql8

swordqiu avatar Jan 03 '24 08:01 swordqiu