I get this error for directadmin

grandm1961

Verified User
Joined
Nov 30, 2020
Messages
84
Location
Wijhe
Hello, i get this error in cockpit for directadmin:

Can't Connect to Local MySQL Server Through Socket '/var/mysql/mysql.sock'​

Now i have changed the port from 3306 to a different port, might that be the issue? And if so how can i change it so it uses the new port that i am using???
 
Now i have changed the port from 3306 to a different port, might that be the issue?
Exactly how did you do this?

I hope you set it as:
port=4060

under the [mysqld] part, right? The 4060 is just an example number, it should read the portnumber you want to use there.
Did you also restarted mysql/mariadb afterwards?

Be aware that you also have to change that port number in the client configs of clients connecting to mysql.
Like your applications connecting to the database.

Question: Why would you want to change to another port? Port 3306 is closed by default in the firewall and if you need remote access, there are other ways to secure this, for example to only allow certain ip's to connect to port 3306.
 
Connection via port is slowly than unix socket.
You might check in "/etc/my.cnf", if you have custom any relate about socket path or not.
 
And it popped up again but only in cockpit so I can control some stuff, but I guess it is a bug somewhere because if I look in my.conf it says:
user="da_admin"
password=""*******""
protocol="socket"
socket="/var/lib/mysql/mysql.sock"

yet when I connect through Directadmin under extra programs/phpmyadmin it opens and connects to a new tab with phpmyadmin and it has 2 apparently db in it or whatever one calls it: with information_scheme and performance_scheme and for the record I am not using mariadb.
 
The latest update, socket path should be in "/var/run/mysql" for user site.
Did you using PHP-fpm isolated mode ?

try.... re-build the PHP to make change updating to the new path.
Code:
da build php
 
Back
Top