AppD Archive

How to resolve mysql.sock error

CommunityUser
Splunk Employee
Splunk Employee

I came across this and thought others might be interested. 

When you host your own controller, you may have a error during startup/install:

151029 12:51:27 InnoDB: 5.5.45 started; log sequence number 11059118728182

151029 12:51:27 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3389

151029 12:51:27 [Note]   - '0.0.0.0' resolves to '0.0.0.0';

151029 12:51:27 [Note] Server socket created on IP: '0.0.0.0'.

151029 12:51:27 [ERROR] Can't start server : Bind on unix socket: Address already in use

151029 12:51:27 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?

151029 12:51:27 [ERROR] Aborting

 

151029 12:51:27  InnoDB: Starting shutdown...

151029 12:51:28  InnoDB: Shutdown completed;

 

By default, the controller assumes you can use /tmp/mysql.sock to start the socket connection to start up the database. If for some reason you have another instance of MySql running on the box, this could also happen. 

 

I suggest you do the following: 

  1. sudo <controller dir>/bin/controller.sh stop-appserver
  2. sudo <controller dir>/bin/controller.sh stop-db
  3. Edit db.cnf: <controller dir>/db/db.cnf. add 
  • socket=<controller dir>/db/mysql.sock under the [mysqld] of db.cnf. This ensures that is starts its own socket and not the defautl MySql socket.

4. Restart the controller and you shoudl be good to go. 

Tags (3)
0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...