Archive for the tag 'init'

SBDavid

The init Daemon

The init Daemon

The init daemon is the system and service manager for Linux. It is the first true process Linux starts when it boots and as such, has a PID of 1 and is the ancestor of all processes. The init daemon has been around since the early days of UNIX, and many people have worked to improve it. The first Linux init daemon was based on the UNIX System V init daemon and is referred to as SysVinit (System V init daemon).

Because SysVinit does not deal well with modern hardware, including hotplug devices, USB hard and flash drives, and network-mounted filesystems, Fedora/RHEL recently replaced it with the Upstart init daemon (http://upstart.ubuntu.com/ and http://upstart.ubuntu.com/wiki). Fedora 15 has moved past Upstart to systemd init daemon.

MySQL service is failing to start up with error “Can’t init databases”

Following is the error message in mysql server log file /var/log/mysqld.log:

/usr/libexec/mysqld: Can’t create/write to file ‘/tmp/ibCfJwf1? (Errcode: 13)

While trying to start it, following is the error.

Initializing MySQL database: [ OK ]
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]

This error occurs when MySQL is not able to access the /tmp directory to write and create temporary files. Make sure /tmp is owned by root and 1777 permisssion is set on /tmp directory.

Following commands will fix the problem.

# chown root:root /tmp
# chmod 777 /tmp
# /etc/init.d/mysqld start

Now MySQL should start without a problem.