Jailshell and mysql commands

From CPanelDirect
Jump to: navigation, search

If your user's have jailshell and try mysql commands, including mysqldump, it will fail.

user@domain [~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

This is because jailshell does not have the mysql socket. There is a workaround. Call mysql with -h for example

mysql -h -u username -p