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

From Docker... AzerothCore does not support MySQL versions below 5.7 or MariaDB versions below 10.5. #18113

Closed
wbrione opened this issue Jan 5, 2024 · 7 comments
Labels
Invalid-Can't reproduce This doesn't seem right

Comments

@wbrione
Copy link

wbrione commented Jan 5, 2024

Current Behaviour

The title speaks for itself... In addition, my database is MariaDB 10.6

Expected Blizzlike Behaviour

Well... Be able to use the MariaDB 10.6 database according to the documented compatibility matrix ;-)

Source

Well, I tried to change the Dockerfile, adding the packages required to use the MariaDB database, but I probably did the update in the wrong place ;-)

Steps to reproduce the problem

After compiling the images, the error already occurs in the first attempt to access the database (DBImport.log)...

...

AzerothCore rev. 33ef56b+ 2024-01-05 09:48:50 +0000 (master branch) (Unix, RelWithDebInfo, Static) (dbimport)
to stop.

(...)

 AzerothCore 3.3.5a  -  www.azerothcore.org

Using configuration file: /azerothcore/env/dist/etc/dbimport.conf
Using SSL version: OpenSSL 3.0.2 15 Mar 2022 (library: OpenSSL 3.0.2 15 Mar 2022)
Using Boost version: 1.74.0

Configuration field WorldDatabaseInfo was overridden with environment variable.
Configuration field CharacterDatabaseInfo was overridden with environment variable.
Configuration field LoginDatabaseInfo was overridden with environment variable.
Configuration field LogsDir was overridden with environment variable.
Opening DatabasePool 'acore_auth'. Asynchronous connections: 1, synchronous connections: 1.
MySQL client library: 8.0.35
MySQL server ver: 5.5.5-10.6.16-MariaDB-1:10.6.16+maria~ubu2004
Connected to MySQL database at mariadb
AzerothCore does not support MySQL versions below 5.7 or MariaDB versions below 10.5.

Found server version: 50505. Server compiled with: 80035.
DatabasePool Login NOT opened. There were errors opening the MySQL connections. Check your log file for specific errors

###########################

From my database container...

root@a21acac0df43:/# mysql -V
mysql Ver 15.1 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

###########################

So... If MariaDB 10.5+ is support... Why docker image has not have the requirements already installed (e.g.: libmariadb-dev-compat, mariadb-client, libmariadbclient-dev, and so) ???

Extra Notes

Well, from the history, this is a very recurrent error, so I don't understand why to this day the precompiled code doesn't support MariaDB 10.6 as suggested by the documentation ;-)

AC rev. hash/commit

AzerothCore rev. 33ef56b+ 2024-01-05 09:48:50 +0000 (master branch) (Unix, RelWithDebInfo, Static) (dbimport)

Operating system

Ubuntu 22.04 (From Container)

Custom changes or Modules

From line 68 of the Dockerfile, I tried to add the packages: mariadb-client libmariadb-dev libmariadb-dev-compat, but apparently, it didn't have the desired effect... You probably need to reference them in other Dockerfile sessions

@Kitzunu
Copy link
Member

Kitzunu commented Jan 5, 2024

First of all MariaDB is not suggested to use as it often gives errors for many users.
Second of all, core side there is nothing wrong serverside with MariaDB support. As it clearly works for many users

Now I am no expert in docker as very few people use it so I cant tell you why you are having this problem. But my suggestion is go MySQL

@wbrione
Copy link
Author

wbrione commented Jan 5, 2024

First of all MariaDB is not suggested to use as it often gives errors for many users. Second of all, core side there is nothing wrong serverside with MariaDB support. As it clearly works for many users

Now I am no expert in docker as very few people use it so I cant tell you why you are having this problem. But my suggestion is go MySQL

From https://www.azerothcore.org/wiki/linux-requirements ...

Ubuntu with MariaDB 10.x
AzerothCore does only support MariaDB versions 10.6 and 10.5.

So... This is not a recommendation, but it is clearly information that leads one to believe that the program is compatible... but apparently, it is not... The problem is, that MariaDB is known to be lighter, has more resources, and is maintained by the community, which led me to choose this database.

@dedmen
Copy link

dedmen commented Jan 6, 2024

I'm running on MariaDB version 10.5 with no issues so far.
But

Found server version: 50505. Server compiled with: 80035.

I had that same problem.
I tried a bunch of things to workaround this but couldn't get anything to work.

In the end, I just modified that version check to shut the heck up, and since then all is golden.
DedmenWoW@3bc6341#diff-3684765e3c5316e1b6a898e5350e00fbb9685f4dfca1ce79bbe2b7037f4470a9

@wbrione
Copy link
Author

wbrione commented Jan 6, 2024

Thanks @dedmen

It is clear that the problem is in the MariaDB version identification strategy, which is a very common problem, generated, apparently, since the "fork" in terms of reference to the version of both products. If we quickly search the internet, we will see several projects and products suffering from the same problem ;-) ...So, based on the "workaround actions" of the other projects, any predictions for the fix in relation to AzerothCore code ?

@wbrione
Copy link
Author

wbrione commented Jan 6, 2024

Rectifying my statement, the correction should not be made in the source code, at least not C/C++, but rather in /azerothcore-wotlk/apps/docker/Dockerfile, and serves as a basis for building the images referenced in /azerothcore-wotlk/docker-compose.yml, which when generated, does not support the MariaDB database.

Going straight to the point, the workaround I applied to generate new private/customized images was precisely to create a customized version of the Dockerfile, as well as in a new "compose" file.

Basically, I removed the reference to the packages: default-mysql-client, libmysqlclient21, default-libmysqlclient-dev, libmysql++-dev, replacing them with the packages: mariadb-client, libmariadb-dev, libmariadb-dev-compat.

When I built the new images, the process was successful, creating and loading all tables OK.

Below is a piece of the log, which shows how the database is recognized...

"MySQL client library: 3.3.4
MySQL server ver: 10.6.16-MariaDB-1:10.6.16+maria~ubu2004
Connected to MySQL database at mariadb
MySQL client library: 3.3.4
MySQL server ver: 10.6.16-MariaDB-1:10.6.16+maria~ubu2004
Connected to MySQL database at mariadb"

I imagine that the challenge is to establish a set of packages required for compiling the program that guarantees compatibility for both MySQL and MariaDB.

I honestly don't know if the MariaDB client is "interchangeable" for using a MySQL database, but the opposite is certainly false ;-)

Well, armed with this information, I hope that the project, which I believe is also responsible for maintaining Docker images and the like, may be looking for a solution, or at least, correcting/increasing the documentation in order to prevent new users from suffering with the same problem.

Thank you in advance for your help and feedback from colleagues.

@Kitzunu
Copy link
Member

Kitzunu commented Jan 8, 2024

program is compatible... but apparently, it is not.

MariaDB is compatible, many users use it without issues. Then some users can't install it properly. If that is your case, feel free to join Discord and ask for help there. Some users have had this issue before and know exactly how to correct their installation, and who is very willing to help others.

But you seem to have fixed the issue, so good for you. Happy it worked out

I hope that the project, which I believe is also responsible for maintaining Docker images

False. This is an open-source project. Anyone is welcome to contribute and everyone work on what they want to work on. If someone wants to improve and maintain docker they can do so. But as I previously said, people work on what they want to work on because this is an open-source community. At the moment there are very few contributors who use docker.

You are free and encouraged to make a PR to correct the issue if you have found some in Dockerfile

@noisiver
Copy link
Contributor

noisiver commented Jan 10, 2024

This issue is, and always has been, user error. It should be closed both because of this but also because they were able to solve it.

Docker should not in any way, shape or form use MariaDB over MySQL. MySQL is the standard and also the focus of AzerothCore in general. If someone decides that they want to use MariaDB instead it's up to them to manage whatever else needs to be changed to do so.

@Kitzunu Kitzunu closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2024
@Kitzunu Kitzunu added the Invalid-Can't reproduce This doesn't seem right label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid-Can't reproduce This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants