Upload big file to database

Discussion in 'ISPConfig 3 Priority Support' started by kaostc, Feb 14, 2025.

  1. kaostc

    kaostc Member HowtoForge Supporter

    Accessing to mysql via cli from ssh connection (site user) throws a mysql socket error:
    ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
    Can a site user do that? Have I to activate something?
    thanks.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    A site user can do that and there is nothing that needs to be activated, you just have to use the correct commandline options for mysql command. You probably use a jailed SSH user, which is good. But the mysql socket is not available in the jail, so you must connect to the localhost IP 127.0.0.1 instead of the socket. Example:

    Code:
    mysql -h 127.0.0.1 -u username -p < sqldump.sql
     
  3. kaostc

    kaostc Member HowtoForge Supporter

    This forces the use of nework instead of socket, I guess. Thanks
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, as the socket is a file that is outside of the jail, it can not be accessed when you enable jailkit for an SSH user.
     
  5. kaostc

    kaostc Member HowtoForge Supporter

    Great, thanks! Works perfectly.
     

Share This Page