Results 1 to 5 of 5

Thread: MySQL socket location and Perl DBI::mysql

  1. #1
    Join Date
    Sep 2008
    Location
    London UK
    Posts
    1,641

    Exclamation MySQL socket location and Perl DBI::mysql

    It seems that my MySQL socket is in /usr/local/mysql/data/, which is symlink'd to /home/mysql/.... Not sure if I changed it or what.

    However, a client tried to install DADAMail via Installatron, it kept failing. Initially thought it was an Apache +ExecCGI issue, but it turned out it wasn't.

    So, I decided to try to manually install it and the results seem to point to the mysql.sock file. It appears that DBI::mysql wants the mysql.sock in /tmp/ (eg. https://stackoverflow.com/questions/...-mysql-sock-is )

    I created a symlink from /tmp/ to /usr/local/mysql/data/, but the database test in DADA's manual installer still fails (see attached screenshot).

    I even tried changing the socket location to /tmp/ but then PHP panicked and couldn't find it (mysql.default_socket / mysqli.default_socket are blank in the php.ini's). I shouldn't need to edit these, right (eg. If empty, uses the built-in MySQL defaults)?

    Furthermore, systemd's mysqld.service has the --socket= argument in, so it overrides the my.cnf one. I thought I was going mad when the socket didn't move.
    Attached Images Attached Images
    Last edited by Peter Laws; 10-08-2018 at 03:23 AM.
    Regards, Peter
    UK Web Hosting - Professional & Reliable Shared and VPS Hosting! Offering DirectAdmin licences on our VPS's

  2. #2
    Join Date
    Sep 2008
    Location
    London UK
    Posts
    1,641
    Found this http://forum.directadmin.com/showthr...404#post264404

    So what about things that look for the socket in /tmp/? I thought a symlink would work, but it doesn't :/

    I tweeted the devs and this is what they said
    This is less a problem with Dada Mail, and more a problem with the MySQL client configuration - that's what you'll want to focus on (and not anything in Dada Mail)

  3. #3
    Join Date
    Apr 2009
    Posts
    2,161
    Quote Originally Posted by Peter Laws View Post
    It seems that my MySQL socket is in /usr/local/mysql/data/, which is symlink'd to /home/mysql/.... Not sure if I changed it or what. [cut...]
    If you are using Debian please see this bug fix: https://directadmin.com/features.php?id=2182 and maybe also useful to read this thread: http://forum.directadmin.com/showthr...ht=#post291071 and this thread: https://forum.directadmin.com/showth...035#post291035

  4. #4
    Join Date
    Sep 2008
    Location
    London UK
    Posts
    1,641
    Update:

    Crude fix is
    When you specify host=localhost, mysql client will try to login to mysql server using unix named pipe which requires a .sock file.This can be bypassed by specifying host=127.0.0.1. This will make mysql client use TCP to connect to the server.

  5. #5
    Join Date
    Sep 2008
    Location
    London UK
    Posts
    1,641
    Pro Tip:

    If you value your sanity, disable DADAMail from Installatron/Softaculous........ The sock file is the least of my worries.......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •