When I try to start mysql server with start mysql , I get this error: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory What could I do to fix it?

I'm running Ubuntu Server btw.

Dani AI

Generated

— that failure means the system message bus (D‑Bus) the init/service tooling expects isn't available. In plain terms: the socket under the run directory for the system bus is missing or the dbus daemon isn't running, so the service manager can't talk to it and the MySQL service start fails.

Quick checks to run first:

sudo ls -ld /var/run/dbus
ps -ef | grep [d]bus

If the dbus package isn't installed, install it. If it is installed but the daemon is not running, start or restart the dbus service. If the dbus runtime directory is missing (common after a fresh/minimal boot or inside a chroot/container), recreate it and set the correct owner before launching the daemon.

Typical fix steps (adjust for your init system):

# install if missing
sudo apt-get update
sudo apt-get install dbus

# start/restart dbus (SysV/Upstart)
sudo service dbus start
# or, older style:
sudo /etc/init.d/dbus start

# if socket/dir missing
sudo mkdir -p /var/run/dbus
sudo chown messagebus:messagebus /var/run/dbus
sudo dbus-daemon --system --fork

Notes and alternatives:

  • On systemd-based systems use systemctl start dbus / systemctl status dbus. The socket path may be under /run there.
  • In containers or chroots without an init, you may need to start the daemon manually or start MySQL directly via its init script or mysqld_safe.
  • If problems continue, check syslog and the MySQL error log for details and confirm which uid/group your system uses for dbus (sometimes dbus instead of messagebus).

Once the system bus is running, start MySQL with your usual service command.

bump

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.