unix_socket=OFF | Installation of a new cPanel with MariaDB 10.5

nadav123

Well-Known Member
Mar 2, 2020
159
18
18
Orlando, FL
cPanel Access Level
Root Administrator
Hello, how are you?
I notice the upgrade of Maria DB 10.5 creates a rule to turn off the UNIX sockets plugin inside.

The same thing is with MySQL 5.7 on a new installation:
symbolic-links=0


BUT MARIADB SUPPORT THAT,
usually, the recommendation is to remove this line when you install MariaDB (symbolic-link=0)

For example:
When you install it is causes conflict with the old MySQL 5.7 and you must clean or delete my.cnf.
MariaDB creates a new my.cnf with this rule i never see:
unix_socket=OFF

I don't know how much is neccery,
but from my knowledge, all the cPanel himself works on UNIX SOCKETS...

So, i got confused,
What is recommended with cPanel and the new MariaDB 10.5?

To remove the rule? ( unix_socket=OFF )
To keep it?

I found this on the MariaDB website:

The website said it some Authentication plugins for UNIX sockets,
It is maybe critical for cPanel and MariaDB to work with all the cPanel UNIX systems.
Maybe need to remove it like symbolic_link?
Imidate after installation of MariaDB 10.5?
( and install MariaDB 10.5 again when the MY.CNF is clean from this rule? )
 
  • Like
Reactions: SaiTharun

cPanelAnthony

Administrator
Staff member
Oct 18, 2021
1,045
112
118
Houston, TX
cPanel Access Level
Root Administrator
Hello! It would be best if you left the unix_socket option disabled. CPanel does not utilize this functionality.


Using unix_socket means that if you are the system root user, you can log in as [email protected] without a password.
Please let me know if this helps!
 

nadav123

Well-Known Member
Mar 2, 2020
159
18
18
Orlando, FL
cPanel Access Level
Root Administrator
I jump it again, because i see MariaDB add again UNIX_SOCKET=OFF

And i try to activate
event_scheduler=ON

but the
SOCKET_UNIX=OFF

ITS WORKING IF I PUT THE EVENT SCHEDULER BEFORE:

# === Disable Plugins & Options ===
# Disable Features
event_scheduler=ON # Events Schedul / phpMyAdmin | Cron job via MySQL
performance-schema=ON # SQL Schema / cPanel Twick | Active
unix_socket=OFF # Security


SOMEONE HAVE REASON WHY?

AND MAYBE NEED TO UNCOMMENT "unix_socket=OFF "???

MariaDB 10.5 adding it by default to the my.cnf
What you say guys?

i am afraid because i know cPanel use unix sockets... maybe this thing need be removed from my,cnf after MariaDB 10.5 Installation?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,793
1,878
363
cPanel Access Level
Root Administrator
According to the MariaDB docs here:


"In MariaDB 10.4.3 and later, the unix_socket authentication plugin is installed by default, and it is used by the 'root'@'localhost' user account by default. See Authentication from MariaDB 10.4 for more information."

and

"In MariaDB 10.4.3 and later, the unix_socket authentication plugin is installed by default, so if you do not want it to be available by default on those versions, then you will need to disable it."

Are you saying it seems to depend on where in the configuration file you place the option?
 

nadav123

Well-Known Member
Mar 2, 2020
159
18
18
Orlando, FL
cPanel Access Level
Root Administrator
Yup,
and i notice: when you install maria db 10.6 throw WHM interface.
(the new one haha i liked him, but the old one was better).

So MariaDB 10.6 put by default the rule in the bottom, (unix_socket=OFF)
I even delete:
my.cnf
my.cnf.d

After i delete the files:
I Install MariaDB 10.6 again THROW WHM INTERFACE
and recreate the folders and the files.


My question is, if cPanel unix sockets?

For example:
php-fpm not use sockets to connect to the database?
Nginx via cPanel use this?

Is very wired to me because all cPanel is UNIX sockets because php-fpm, and if you use NGINX (even the one made by cPanel).
i think they connected in sockets from PHP-FPM/FAST-CGI...

It is like very unlogical.
all this year from the update of MariaDB 10.5
i see a warning in the log: MysqlUtils-Unprivileged

This is an article from cPanel support about the issue:


I Think UNIX_SOCKET connected to this issue, and maybe the guy not right.
The must logic is to turn on the Unix sockets.

You can get inside PhpMyAdmin.
You will see this is on sockets as well.

Now, can be it some security thing as well.
This is the reason they put it in the bottom, maybe to close the socket after all the other services connected.

But still, what about PHP-FPM / FASTCGI?
What about clients work with NGINX (even the made from cPanel).

Maybe this need deep check,
because i not find any logic to turn UNIX sockets off.
Opposite, i think it trigger the "MysqlUtils-Unprivileged" warning inside mysql log.

by the way, about the "false" warning "MysqlUtils":
The warning not stop, and very hard follow the log.
Log should be clean from WARNING.

You can achieve that with: log_warning=1
but mysql docs not recommended, and you need to follow your log.

If you work with a tool like MySqlTuner.
All the time you will get errors / warning about: MysqlUtils in the tools.


_________________________________________

I tell you that because MysqlUtils is actual a tool.
The warning is a premison problem, and i suspect on the UNIX_SOCKET=OFF

can be possibility this what block the tool, i still do a couple of test but i be happy for your help.
 

nadav123

Well-Known Member
Mar 2, 2020
159
18
18
Orlando, FL
cPanel Access Level
Root Administrator
Sorry my mistake i ready now, the plugin (unix_socket=OFF)
when it's off, its installed, but not active, it's actually easier to get inside the socket, i sorry my mistake.

still doing tests.
 
  • Like
Reactions: cPRex