I personally don't advise SSH access jailshell or otherwise unless absolutely
necessary and even then hold it in reserve because it opens up just far
too many security issues.

With that said though, the default restrictions for jailshell will not allow
for unix socket connections but you should still be able to access MySQL
using TCP connections using the hostname at port 3306.