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

Building with mysql is hard #218

Open
bretonium opened this issue Oct 20, 2018 · 2 comments
Open

Building with mysql is hard #218

bretonium opened this issue Oct 20, 2018 · 2 comments

Comments

@bretonium
Copy link
Contributor

Today i have spent a lot of time trying to build infclass with mysql support. Even though the build succeeded, i always got this error when launched sql_server_d:

[5bcb4203][sql]: MySQL Error: Access denied for user 'breton'@'localhost'
[5bcb4203][sql]: ERROR: sql connection failed
[5bcb4203][sql]: Warning: Unable to connect to SqlWriteServer 0 ('127.0.0.1'), trying next...
[5bcb4203][sql]: FATAL ERROR: No SqlWriteServers available

I got this error even though i used another user for mysql credentials.

Turns out, i needed to install development libraries to my system: apt install libmariadbclient-dev libmysqlcppconn-dev. I also had to edit config.lua and set mysql.use_mysqlconfig = true. I figured it out only after seeing a mention of a similar problem with DDNet.

The perfect fix would be build system failure if required libraries are not present on the system. Less perfect fix would be documenting current behavior and/or running reproducible builds somewhere.

@progval
Copy link
Collaborator

progval commented Oct 21, 2018

I don't think the problem was caused by a missing library, because infclass clearly managed to contact mysql (Access denied for user 'breton'@'localhost' is an error from the server).

The bug here is a runtime bug, with nothing to do with dependencies; which just happens to go away when you use mysql.use_mysqlconfig = true.
I had a similar issue some time ago. Try changing your MySQL password to something simpler, eg. 10 alphanumerical characters.

@progval
Copy link
Collaborator

progval commented Oct 21, 2018

Eww I just took a look at the code, and noticed that infclass bundles an old version of libmysqlclient. That's probably where the bug is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants