Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft MySQL Connection Problem #588

Closed
2 tasks
BenjaminCz0101 opened this issue Aug 26, 2023 · 4 comments
Closed
2 tasks

Microsoft MySQL Connection Problem #588

BenjaminCz0101 opened this issue Aug 26, 2023 · 4 comments
Labels
question Further information is requested

Comments

@BenjaminCz0101
Copy link

BenjaminCz0101 commented Aug 26, 2023

Have you read the documentation?

  • [ X] Yes, but it does not include related information regarding my question.
  • [ X] Yes, but the steps described in the documentation do not work on my machine.
  • [X ] Yes, but I am having difficulty understanding it and wants clarification.

You are setting up gotify in

  • Docker
  • [ X] Linux native platform
  • Windows native platform

Describe your problem
Hi there,

i have a Problem to Connect Microsoft MySQL Server. When i Starting with this Config my Gotify Server i have a Error in Logfile:

root@Gotify:/opt/gotify# sudo ./gotify-linux-amd64
Starting Gotify version 2.3.0@2023-07-20-18:03:23
panic: unknown time zone 192.168.178.140

goroutine 1 [running]:
main.main()
/proj/app.go:47 +0x36d
root@Gotify:/opt/gotify#

my config is ...

server:
  keepaliveperiodseconds: 0 # 0 = use Go default (15s); -1 = disable keepalive; set the interval in which keepalive packets will be sent. Only change this value if you know what you are doing.
  listenaddr: "" # the address to bind on, leave empty to bind on all addresses
  port: 80 # the port for the http server
  ssl:
    enabled: false # if https should be enabled
    redirecttohttps: true # redirect to https if site is accessed by http
    listenaddr: "" # the address to bind on, leave empty to bind on all addresses
    port: 443 # the https port
    certfile: # the cert file (leave empty when using letsencrypt)
    certkey: # the cert key (leave empty when using letsencrypt)
    letsencrypt:
      enabled: false # if the certificate should be requested from letsencrypt
      accepttos: false # if you accept the tos from letsencrypt
      cache: data/certs # the directory of the cache from letsencrypt
      hosts: # the hosts for which letsencrypt should request certificates
  #     - mydomain.tld
  #     - myotherdomain.tld
  responseheaders: # response headers are added to every response (default: none)
  # X-Custom-Header: "custom value"

  cors: # Sets cors headers only when needed and provides support for multiple allowed origins. Overrides Access-Control-* Headers in response headers.
    alloworigins:
    # - ".+.example.com"
    # - "otherdomain.com"
    allowmethods:
    # - "GET"
    # - "POST"
    allowheaders:
  #   - "Authorization"
  #   - "content-type"

  stream:
    pingperiodseconds: 45 # the interval in which websocket pings will be sent. Only change this value if you know what you are doing.
    allowedorigins: # allowed origins for websocket connections (same origin is always allowed, default only same origin)
#     - ".+.example.com"
#     - "otherdomain.com"
database: # see below
  **dialect: mysql
  connection: gotify:password@/gotify?charset=utf8&parseTime=true&loc=192.168.XXX.XXX**
defaultuser: # on database creation, gotify creates an admin user (these values will only be used for the first start, if you want to edit the user after the first start use the WebUI)
  name: admin # the username of the default user
  pass: admin # the password of the default user
passstrength: 10 # the bcrypt password strength (higher = better but also slower)
uploadedimagesdir: data/images # the directory for storing uploaded images
pluginsdir: data/plugins # the directory where plugin resides (leave empty to disable plugins)
registration: false # enable registrations

Any errors, logs, or other information that might help us identify your problem

Ex: docker-compose.yml, nginx.conf, android logcat, browser requests, etc.

Name of the information here

contents here

@BenjaminCz0101 BenjaminCz0101 added the question Further information is requested label Aug 26, 2023
@jmattheis
Copy link
Member

The loc params in the mysql connection string describes the timezone and not the host. Define the host like this:

gotify:secret@tcp(localhost:3306)/gotifydb?charset=utf8&parseTime=True&loc=Local

Replace localhost with your IP / host.

I've updated the gotify.net docs accordingly.

@BenjaminCz0101
Copy link
Author

BenjaminCz0101 commented Aug 27, 2023 via email

@jmattheis
Copy link
Member

Given the port you've specified (1433), I expect you to use Microsoft SQL (MSSQL) not some kind of MySQL. MSSQL isn't supported by gotify.

@BenjaminCz0101
Copy link
Author

ok thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants