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

Add MariaDB socket #30

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add MariaDB socket #30

wants to merge 4 commits into from

Conversation

enoch85
Copy link

@enoch85 enoch85 commented Jan 24, 2025

Make socket the default connection method, and keep user/pass as an option.

mysql_secure_installation recommends using a socket instead.

Make socket the default connection method, and keep user/pass as an option.
@markwj
Copy link
Member

markwj commented Jan 25, 2025

This would break current deployments.

If you want to do this, better to have it as a configurable option and leave the defaults unchanged (so existing deployments are not affected). This needs to be done in a backwards compatible way.

@enoch85
Copy link
Author

enoch85 commented Jan 25, 2025

Hmm, but existing deployments should already have a config file? This only affects new installations, or am I missing something here?

@markwj
Copy link
Member

markwj commented Jan 25, 2025

Hmm, but existing deployments should already have a config file? This only affects new installations, or am I missing something here?

Sorry, I misread the commit and thought it was changing the code. Dangers of doing this on a mobile phone…

But now I am wondering why we are changing the default provided in the config? Perhaps better to just provide some documentation (comments) there to give some examples for different environments?

@enoch85
Copy link
Author

enoch85 commented Jan 25, 2025

why we are changing the default provided in the config?

I was thinking since SOCKET is recommended due to security, maybe that's what we (you) want to advocate?

I intend to contribute to this repo and improve it were I can, just need to get my head around perl. I'm more of a sysadmin guy. :)

@enoch85
Copy link
Author

enoch85 commented Jan 25, 2025

In the long run, maybe we can provide an easy way to setup the server, like a preconfigured VM or something. I've done it in the past with Nextcloud since I love that project. And since I'm now invested in this as well I have much to gain on getting a wider spread so that more people can use it - and contribute.

Then on the other hand, maybe it's not a good idea to invest in the V2 server at all?

@dexterbg
Copy link
Member

I think we should keep the TCP/IP scheme as the default, because it's the default MySQL & MariaDB setup, and most distributions & sysadmins keep this default, so 127.0.0.1 will normally work. The socket path default OTOH is /tmp/mysql.sock and is normally changed by distributions.

Also, a TCP loopback connection to 127.0.0.1 is perfectly secure. If an intruder can manipulate the TCP stack on your machine, he's got full access already and can manipulate everything. If you mean advocating the use of skip-networking for the database defaults, this is the wrong way & place for that.

@enoch85
Copy link
Author

enoch85 commented Jan 25, 2025

I hear you. Made some changes, please have a look. 👍

Please squash and commit. Got wild with the commits here. :)

@enoch85 enoch85 changed the title Change to MySQL socket Add MariaDB socket Jan 25, 2025
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

Successfully merging this pull request may close these issues.

3 participants