mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.43k stars 1.12k forks source link

Switching to mysql from sqlite #6492

Closed rinpromise closed 3 months ago

rinpromise commented 4 months ago

Description

I want to switch to mysql database from sqlite. I have edited the mumbleserver.ini file and uncommented these lines with appropriate values: dbDriver=QMYSQL database=mumble dbHost=ip dbPort=3306 dbUsername=username dbPassword=password dbPrefix=mumble-server

Steps to reproduce

services: mumble-server: image: mumblevoip/mumble-server:latest container_name: mumble-server restart: unless-stopped ports:

Mumble version

docker:latest

Mumble component

Server

OS

Linux

Reproducible?

Yes

Additional information

With Navicat, can successfully connect to the database.

Relevant log output

ServerDB: Failed initialization: Can't connect to MySQL server on 'ip:3306' (110) QMYSQL: Unable to connect

Screenshots

No response

Krzmbrzl commented 4 months ago

Do you have the qt MySQL driver installed?

rinpromise commented 4 months ago

您是否安装了qt MySQL驱动程序?

I am using a Docker image, and I am not sure if there is a MySQL driver installed in the image

Krzmbrzl commented 4 months ago

I don't think there is. If the driver is not installed, you can't use anything other than SQLite. Note that this will change with #6263 as this removes Qt from the equation (as far as the database is concerned)

rinpromise commented 4 months ago

I don't think there is. If the driver is not installed, you can't use anything other than SQLite. Note that this will change with #6263 as this removes Qt from the equation (as far as the database is concerned)

Great changes! When can we try them out?

Krzmbrzl commented 4 months ago

If you feel like compiling yourself, you can try it immediately. The PR should be pretty stable already (at least on Linux). Otherwise, you'll have to wait for Mumble 1.6 for which there is no ETA yet.

github-actions[bot] commented 4 months ago

As there has been no activity on this issue for a couple of days, we assume that your issue has been fixed in the meantime. Should this not be the case, please let us know.

If no further activity happens, this issue will be closed within 3 days.

rinpromise commented 4 months ago

If you feel like compiling yourself, you can try it immediately. The PR should be pretty stable already (at least on Linux). Otherwise, you'll have to wait for Mumble 1.6 for which there is no ETA yet.

To compile it myself, which branch should I pull? The master branch?

Hartmnt commented 4 months ago

To compile it myself, which branch should I pull? The master branch?

https://github.com/Krzmbrzl/mumble/tree/refac-database

rinpromise commented 4 months ago

To compile it myself, which branch should I pull? The master branch?

https://github.com/Krzmbrzl/mumble/tree/refac-database

Thanks! What configuration steps are needed to use MySQL after compiling?

Krzmbrzl commented 4 months ago

Thanks! What configuration steps are needed to use MySQL after compiling?

Set the dbDriver config option to MYSQL and then populate database, dbUsername, dbPassword, dbHost and dbPort as appropriate for your local DB setup.

Furthermore, beware of https://github.com/Krzmbrzl/mumble/blob/815bd0661b03bec1131d8d1873dc69775c9539ef/src/tests/TestDatabase/README.md?plain=1#L34-L42

rinpromise commented 4 months ago

Thanks! What configuration steps are needed to use MySQL after compiling?

Set the config option to and then populate , , , and as appropriate for your local DB setup.dbDriver``MYSQL``database``dbUsername``dbPassword``dbHost``dbPort

Furthermore, beware of https://github.com/Krzmbrzl/mumble/blob/815bd0661b03bec1131d8d1873dc69775c9539ef/src/tests/TestDatabase/README.md?plain=1#L34-L42

Compilation was successful. The new additions include libmysqlclient-dev, libpq-dev, and libsqlite3-dev, along with the original requirement of CMake ≥ 3.23.

rinpromise commented 4 months ago

Thanks! What configuration steps are needed to use MySQL after compiling?

Set the config option to and then populate , , , and as appropriate for your local DB setup.dbDriver``MYSQL``database``dbUsername``dbPassword``dbHost``dbPort

Furthermore, beware of https://github.com/Krzmbrzl/mumble/blob/815bd0661b03bec1131d8d1873dc69775c9539ef/src/tests/TestDatabase/README.md?plain=1#L34-L42

The dbPort parameter seems ineffective; no matter what value it is set to, it still defaults to 3306.

rinpromise commented 4 months ago

Thanks! What configuration steps are needed to use MySQL after compiling?

Set the dbDriver config option to MYSQL and then populate database, dbUsername, dbPassword, dbHost and dbPort as appropriate for your local DB setup.

Furthermore, beware of https://github.com/Krzmbrzl/mumble/blob/815bd0661b03bec1131d8d1873dc69775c9539ef/src/tests/TestDatabase/README.md?plain=1#L34-L42

[ERROR]: Can't connect to MySQL server on 'ip:3306' (110) No matter how I change the dbPort, the error persists unchanged.

Krzmbrzl commented 4 months ago

@RinPromise good catch! That's indeed a bug in the current implementation. My most recent commit should address this (you might have to force-pull as I have been doing some force pushing to my branch).

github-actions[bot] commented 3 months ago

As there has been no activity on this issue for a couple of days, we assume that your issue has been fixed in the meantime. Should this not be the case, please let us know.

If no further activity happens, this issue will be closed within 3 days.