Closed IITuxtmuxII closed 1 year ago
This error is due to Mysql is using strict mode, your system is windows?
I use ubuntu 20.04 on an vps
I can't reproduce it, you could check the sql_mode
in your mysql container config.
the right mode should like below.
sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Hi here is the config
[mysqld] sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION innodb_strict_mode = 0; character-set-server=utf8mb4
here is the docker-compose.yml as well
version: '3'
services:
web:
build: .
# platform: linux/amd64
container_name: gpw-web
ports:
- 9000:80
- 9002:9002 # vite
- 35729:35729 # livereload
depends_on:
- memcached
- mysql
volumes:
- .:/var/www:delegated
- node-modules:/var/www/node_modules
- .docker/web/nginx.conf:/etc/nginx/sites-enabled/gazelle.conf
- .docker/web/www.conf:/etc/php/7.3/fpm/pool.d/www.conf
environment:
# These should match what you set for your mysql container below
- MYSQL_USER=gazelle
- MYSQL_PASSWORD=password
memcached:
image: memcached:1.5-alpine
container_name: gpw-memcached
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: gpw-phpmyadmin
environment:
- PMA_HOST=mysql
- PMA_USER=gazelle
- PMA_PASSWORD=password
depends_on:
- mysql
ports:
- 9001:80
mysql:
image: mariadb:10.3
container_name: gpw-mysql
ports:
- 36000:3306
volumes:
- ./.docker/mysql/mysqld_sql_mode.cnf:/etc/mysql/conf.d/mysqld_sql_mode.cnf:delegated
- mysql-data:/var/lib/mysql
- ./gazelle.sql:/docker-entrypoint-initdb.d/gazelle.sql:ro
environment:
- MYSQL_DATABASE=gazelle
- MYSQL_USER=gazelle
- MYSQL_PASSWORD=password
- MYSQL_ROOT_PASSWORD=em%G9Lrey4^N
manticoresearch:
build: ./.docker/manticore
# platform: linux/amd64
container_name: gpw-manticoresearch
depends_on:
- mysql
- web
volumes:
- manticore-data:/var/lib/manticore
- ./.docker/manticore/manticore.conf:/var/lib/manticore/conf/manticore.conf
environment:
# These should match what you set for your mysql container above
- MYSQL_USER=gazelle
- MYSQL_PASSWORD=password
volumes:
node-modules: #~/data_node
mysql-data: #~/data
manticore-data: #~/manti
prune the mysql-data volume and re up docker-composer, see if there is an error in mysql container log.
Or if you familiar with, you can debug mysql issue by yourself.
I can only find this in the errorlogs this was in the nginx-error.log:
`2022/11/07 17:21:51 [error] 180#180: *11 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught DB_MYSQL_Exception: MySQL: Invalid Query: INSERT INTO users_info (UserID, StyleID, AuthKey, Inviter, JoinDate, AdminComment, Info, Avatar, SiteOptions, Warned, SupportFor, TorrentGrouping, ResetKey, ResetExpires, RatioWatchEnds, BanDate, InfoTitle) VALUES ('1', '35', 'ccdfb50433a8a73395de7afd2b58bbe2', '0', '2022-11-07 17:21:51', '', '', '', '', '0000-00-00 00:00:00', '', '0', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '') SQL error: 1364 (Field 'SettingTorrentTitle' doesn't have a default value) in /var/www/classes/mysql.class.php:199 Stack trace:
`
Hi here is the config
[mysqld] sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION innodb_strict_mode = 0; character-set-server=utf8mb4
This config file does not take effect, you need to check the docker mysql startup log.
Hi when I try to register a User I get this error:
I also wanted to ask if there is an admin account already installed?