Sorry to drag this longer than it should but
as @harshil1712 assumed we/I use the docker-compose.yml
I opened the port 5678 and access it directly with this port instead of behind NGINX
and n8n + mysql or postgres works well if we abstract the proxy (NGINX).
and now it works well, even behind NGINX if I use
proxy_pass http://localhost:5678;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
as mentioned here: Nginx configuration - #7 by Arnaud