# MySQL wont start

## zebrapad

This problem has been keeping me up for two nights, and I am desperate to find a clue.

```
duvel init.d # ./mysql start

 * Caching service dependencies ...     [ ok ]

 * Starting mysql ...

 * Starting mysql (/etc/mysql/my.cnf)

 * MySQL NOT started (1)                  [ !! ]
```

```
duvel init.d # mysqld

070824 23:07:48 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=/var/run/mysqld/mysqld-bin' to avoid this problem.

mysqld: File '/var/run/mysqld/mysqld-bin.index' not found (Errcode: 13)

070824 23:07:48 [ERROR] Aborting

070824 23:07:48 [Note] mysqld: Shutdown complete

```

However ... /var/run/mysqld/ is an empty directory !!

What is the file /var/run/mysqld/mysqld-bin.index for ?

----------

## mattsteven

The log-bin thing is just a warning and can be ignored.  Enable log-bin and set a server-id in my.cnf to get it going properly.

Read  /var/log/mysql/mysqld.err to find out what is really wrong.

```
tail -n 100  /var/log/mysql/mysqld.err
```

The index file should contain a line pointing to your current mysqld-bin.0000000?? file if you were wondering and that should all work fine when you have logging going.

----------

## zebrapad

No entries in mysqld.err when I stry to start my mysql server.

However, I trapped the mysqld init.d script command and did the same in the console (as root) :

```
duvel init.d # mysqld --defaults-file=/etc/mysql/my.cnf --log-bin=duvel --basedir=/usr --datadir=/var/lib/mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock

mysqld: Can't create/write to file '/tmp/ibiSIFVC' (Errcode: 13)

070825 12:55:07  InnoDB: Error: unable to create temporary file; errno: 13

070825 12:55:07 [ERROR] Can't start server : Bind on unix socket: Permission denied

070825 12:55:07 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?

070825 12:55:07 [ERROR] Aborting

070825 12:55:07 [Note] mysqld: Shutdown complete
```

----------

## mattsteven

As root,

```
chmod 1777 /tmp
```

----------

## zebrapad

My system got messed up.

```
chmod a+x /
```

fixed it !

----------

## shimbob

my problem was that /var was drwx------ not drwxr-xr-x

chmod a+rx /var fixed it

----------

