MariaDB.

Support for security such as Firewalls and securing linux
Post Reply
hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

MariaDB.

Post by hack3rcon » 2020/08/11 12:25:45

Hello,
I'm using "mysql Ver 15.1 Distrib 10.3.17-MariaDB, for Linux (x86_64) using readline 5.1" on CentOS 8.
How can I set "max_password_errors" and "bind-address=127.0.0.1"?
Which file must be edit? The "/etc/my.cnf" or "/etc/my.cnf.d/mariadb-server.cnf"?


Thank you.

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: MariaDB.

Post by jlehtone » 2020/08/11 19:09:39

hack3rcon wrote:
2020/08/11 12:25:45
I'm using "mysql Ver 15.1 Distrib 10.3.17-MariaDB, for Linux (x86_64) using readline 5.1" on CentOS 8.[/url]
Interesting way to express that.
I would tell the output of rpm -q mariadb-server or dnf list mariadb-server.
The current default mariadb in CentOS 8 is

Code: Select all

mariadb-server.x86_64   3:10.3.17-1.module_el8.1.0+257+48736ea6    @AppStream
From dnf module mariadb. The baffling thing is that CentOS 8 has readline 7.0, not 5.1.
hack3rcon wrote:
2020/08/11 12:25:45
How can I set "max_password_errors" and "bind-address=127.0.0.1"?
Which file must be edit? The "/etc/my.cnf" or "/etc/my.cnf.d/mariadb-server.cnf"?
Does the /etc/my.cnf contain something like:

Code: Select all

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
That !includedir directive reads files from /etc/my.cnf.d/, including the mariadb-server.cnf.
See https://mariadb.com/kb/en/configuring-m ... irectories
and https://mariadb.com/kb/en/configuring-m ... ile-syntax

Therefore, I would say: neither. Add a file of your own into /etc/my.cnf.d/
That way settings by you stay neatly separate from whatever the package provides.

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: MariaDB.

Post by hack3rcon » 2020/08/12 17:26:38

Thank you.
On my server:

Code: Select all

# rpm -q mariadb-server
mariadb-server-10.3.17-1.module_el8.1.0+257+48736ea6.x86_64
And:

Code: Select all

$ cat /etc/my.cnf
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#bind-address =127.0.0.1
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
Thus, I should create a file under "/etc/my.cnf.d/" directory and put below lines into it:

Code: Select all

max_password_errors=10
bind-address=127.0.0.1
Am I right?

Post Reply