Error: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ mariadb

Explanation: The socket file can’t be found at /tmp/mysql.sock

  1. Verify MySQL is running
    • service mysql status
  2. Locate the socket file
    • updatedb 
    • locate mysql.sock (alternatively ‘lsof | grep mysql.sock’)
    • It might also just be in /var/lib/mysql/mysql.sock
  3. Specify the sock file in line with the rest of your xtrabackup command
    • –sock=/var/lib/mysql/mysql.sock

Error: InnoDB: Operating system error number 24 in a file operation. Or file limit

Explanation: The server places restrictions on how many files you can have open. MySQL has hit this limit

  1. Check the open file limit on the server
    • ulimit -Hn
  1. Revise the limit to say 50,000
    • ulimit -n 50000

Error: Can’t connect to MySQL

Explanation: The command is trying to access MySQL but something is incorrect. Specify the following parameters in the command:

  • –host=IP
  • –username=user
  • –password=password
  • –sock=/path/to/mysql.sock

Leave a Reply

Your email address will not be published. Required fields are marked *