DDEV无法在mysql 5.7上的Drupal9+上写入TRANSACTION ISOLATION LEVEL

nfg76nw0  于 2023-05-28  发布在  Mysql
关注(0)|答案(1)|浏览(153)

我面临一个问题,在数据库中设置的“SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED”在DDEV中被覆盖,以在重启或恢复时重复读取。
这是一个多站点,所有站点都工作正常,但在快照恢复时会出现以下情况:

>  ddev snapshot restore
multi_20230518092603
Stopping db container for snapshot restore of 'multi_20230518092603-mysql_5.7.gz'...
With large snapshots this may take a long time.
This will normally time out after 120 seconds (max of all container timeouts)
but you can increase it by changing default_container_timeout.
Using custom PHP configuration: [/home/user/project/multi/.ddev/php/apc-php.ini]
Custom configuration is updated on restart.
If you don't see your custom configuration taking effect, run 'ddev restart'.
Container ddev-multi-dba  Running
Container ddev-multi-web  Running
Container ddev-multi-db  Started
Container ddev-router  Running
Not creating CMS settings files because disable_settings_management=true
unable to SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED: stdout='', stderr='', err=ComposeCmd failed to run 'COMPOSE_PROJECT_NAME=ddev-multi docker-compose -f /home/user/project/multi/.ddev/.ddev-docker-compose-full.yaml exec -T db bash -c set -eu && ( mysql -e "SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;" 2>/dev/null)', action='[exec -T db bash -c set -eu && ( mysql -e "SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;" 2>/dev/null)]', err='exit status 1', stdout='', stderr=''
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/tmp/mysql.sock' (2)
Task failed: Exec command 'mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS multi; GRANT ALL ON multi.* to 'db'@'%';"' in container/service 'db': exit status 1

因为不能完全弄清楚这一点,因为数据库连接缝工作。“Can 't connect to local MySQL server through socket '/var/tmp/mysql. sock'"tmp被设置为777
任何关于这一点的指针是赞赏。谢谢。

ttcibm8c

ttcibm8c1#

这里似乎有两个bug影响了mysql或mysql:5.7。在https://github.com/ddev/ddev/issues/4933;中打开的问题这两个错误在https://github.com/ddev/ddev/pull/4934中似乎都已修复-请查看。此修复将出现在DDEV v1.22.0版本以及之前的预发布版本中。

相关问题