IspConfig shell user "Can't connect to local MySQL server"

Discussion in 'Installation/Configuration' started by Richard Foley, Aug 6, 2019.

  1. Richard Foley

    Richard Foley Member

    I have a bit of a problem connecting, as an ispconfig shelluser account, to the mysql running on the debian server.
    I can use mysql as a "normal" user (outside the jail), and the shell user can use mysql via his own wordpress installation. However, trying to connect directly, via the commandline client (mysql), seems to be blocked.

    $ mysql --version
    mysql  Ver 15.1 Distrib 10.1.38-MariaDB, for debian-linux-gnu (i686) using readline 5.2
    $ mysql -v
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
    I'm not sure if I'm doing something extra daft or this is expected behaviour?

    All helpful suggestions appreciated.
  2. till

    till Super Moderator Staff Member ISPConfig Developer


    mysql -h

    to cnnect to mysql over the network as the mysql socket is not accessible inside the jail.
    Richard Foley likes this.
  3. Richard Foley

    Richard Foley Member

    hi Till,
    that works perfectly, thanks for the workaround.
    If it's not a silly question, how do users access mysql when they need to? I mean, presumably the intention is to keep the mysql cli out of user hands for security reasons. They will still need to access the database on occasion though, I'd expect. I suppose myphpadmin would be one alternative, is this the recommended solution?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, most users use phpmyadmin. Especially as it's easier to use due to its graphical interface.
    Richard Foley likes this.
  5. Richard Foley

    Richard Foley Member

    ak, makes some sense, and it's well known.
    Thanks for your feedback here, Till.

Share This Page