0

I have a problem with MariaDB (mysqld.sock) I have the next architecture:

  1. Deployment for APP1
  2. Deployment for MariaDB1
  3. PV11 and PVC11 (/var/lib/mysql/), PV12 and PVC12 (/run/mysql/)
  4. NFS1 server. Database and mysqld.sock save in NFS
  5. Namespace1

From deployment MariaDB1 I get files DB and mysqld.sock saved in NFS server and than mounted to deployment for app1. The APP1 works well. And I have exactly the same application 2 which does not work via the socket. When I connect to MySQL via mysqld.sock from pod APP1 I have a connection. But when I connect to MySQL via mysqld.sock from pod APP2 I have an error. mysql -S /opt/mariadb-mysqld/mysqld.sock -u root -p ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/mariadb-mysqld/mysqld.sock' (111)

enter image description here

1
  • Are you aware that unix sockets won't work across different hosts? And why would you even share /var/lib/mysql/ to the application? The application only needs a unix socket or a TCP socket to talk to MariaDB.
    – AlexD
    Commented Feb 17 at 8:56

0

You must log in to answer this question.

Browse other questions tagged .