How to chroot MySQL client for users in Plesk?

Follow

Comments

10 comments

  • Avatar
    Rico Rothenburger (Edited )

    That's not a good idea. Logged-in users can delete the file, which terminates the entire MySQL server.

    better: mount -o bind,ro /var/run/mysqld /var/www/vhosts/example.com/var/run/mysqld

    In general, however, the mount causes Plesk to delete the file and the MySQL server is no longer working. For example, if you delete the client, then all files will be deleted and also the mysqld.sock file.

    Is this workaround only for Plesk 12.5?

    0
    Comment actions Permalink
  • Avatar
    Bulat Tsydenov

    @Rico This workaround is applicable for all currently supported Plesk versions for Linux

    0
    Comment actions Permalink
  • Avatar
    Kingsley Felix

    looks complicated

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @iamkingsleyf,

    Please, let me know which questions do you have when applying the solution from this article?

    0
    Comment actions Permalink
  • Avatar
    Kingsley Felix

    you guys said its not recommended.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @iamkingsleyf, indeed, such actions are performed at your own risk.

    0
    Comment actions Permalink
  • Avatar
    Fabien F. Dubroca

    Hello Plesk Team,

    Trying to add mysql to a chrooted user on Plesk Obsidian but I'm getting a 404 on the update_chroot tool download.

    Can you please update the URL ?

    Thanks !

    0
    Comment actions Permalink
  • Avatar
    Anton Maslov

    Hi Fabien, updated.

    0
    Comment actions Permalink
  • Avatar
    Webservicesmgmt-lisa

    In step 2 you are doing a wget of the file update-chroot.sh but in the rest of the command after chmod you mentioning update_chroot.sh as also in step 3 (I think this was the old name). 

    0
    Comment actions Permalink
  • Avatar
    Aleksey Khikhich

    Hello @Webservicesmgmt-lisa

    Thank you for noticing that, commands are corrected.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request