-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
MySQL Support #2837
base: main
Are you sure you want to change the base?
MySQL Support #2837
Conversation
I'm working on it, and from what I've seen, adding mysql support seems to be pretty straightforward. But I haven't tested it yet and I'm not sure if it will work, so it's still in draft stage. Can someone tell me how to compile and test on the server side? |
Thanks for the submission @ismail0234. Can you enable github action tests for MySQL as well? See the current ones here:
|
@bcmmbaga can you share how to add a testcontainer for MySQL? |
@ismail0234 To add a MySQL test container, you will need to add MySQL support in the netbird/management/server/store.go Line 253 in a9d06b8
To spin up a new MySQL test container, you can follow the same approach we used for PostgreSQL
|
The “security/snyk” step seems to have failed but I can't see what caused it. |
Go modules seem out of sync with the codebase. Could you run |
hmm, the result still seems to be the same. |
Is this part used for testing? Do I need to add mysql values?
netbird/.github/workflows/test-infrastructure-files.yml Lines 40 to 44 in a9d06b8
|
We are ready for the next test. Let's see what errors we get this time. -_- |
TestContainers have been optimized. Instead of creating a new test container each time, we create 1 for mysql and postgres and cache it. Test time for Postgres decreased from 350+ seconds to 140 seconds. |
The MySQL test seems to have been successful. 🥳 https://github.com/ismail0234/netbird/actions/runs/11777556741 |
Hi @mlsmaycon , How can I use this in a new server? |
I tested it in production environment. Mysql connection is established and working without any problem. But when I use 127.0.0.1 in the mysql connection string, the connection is not established. When I enter the ip address of the server, the connection can be established. I am not sure if this is a docker related issue. Mysql and netbird are running on the same server. |
Some tests failed. Is it a general problem? |
Everything is complete. I've tested it in a production environment and so far I haven't had any problems. The peers can connect to each other and we can use the panel features. It looks like there's nothing else I can do. @bcmmbaga |
Quality Gate passedIssues Measures |
Using MySQL database made the api calls very fast. When I use sqlite, api calls take 1.5-4 seconds when there are 500 peers on the network, while it takes 0.2 seconds when we use mysql. |
Describe your changes
MySQL support for Netbird. Still in draft stage. I have never used the “GO” language before, so if I have any mistakes you can help me to correct them.
Issue ticket number and link
Checklist