Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

MySQL Access in Jailkit [Debian 9 + ISPconfig3]

I having some issues enabling mysql support for jailkit environment. I need to allow my clients to run some PHP commands to make changes to their wesbites.

This is the error I get when running from the jailed user:

$mysqladmin ping         
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111 "Connection refused")'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

I have tested it in several ways:
$ nano /etc/jailkit/jk_init.ini
comment = mysql client
executables = /usr/bin/mysql, /usr/bin/mysqladmin, /usr/bin/mysqlcheck, /usr/bin/mysqldump, /usr/bin/mysqlhotcopy, /usr/bin/mysql$
paths = /usr/lib/x86_64-linux-gnu/, /usr/lib/x86_64-linux-gnu/, /usr/lib/x86_64-linux$
regularfiles = /etc/mysql/my.cnf
$ jk_init -c /etc/jailkit/jk_init.ini -f -k -j /var/www/clients/client1/web1 mysql_client


$ jk_cp  -f -v -j /var/www/clients/client1/web1/ /var/run/mysqld

/var/run/mysql/mysqld.sock Had to copy this manually to the jailed user as otherwise the environment just doesn't find it. Permission are set to 777 and mysql:mysql


  • Changed my config to use instead of localhost and MySQL works well now.
Sign In or Register to comment.


Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!
© 2013 - 2024 Time4VPS. All rights reserved.

Get In Touch