1

When I try to start

sudo service mysql start
start: Job failed to start

Then I look the /var/log/mysql/error.log

160122  8:43:42 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160122  8:43:42 [Note] Plugin 'FEDERATED' is disabled.
160122  8:43:42 InnoDB: The InnoDB memory heap is disabled
160122  8:43:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160122  8:43:42 InnoDB: Compressed tables use zlib 1.2.8
160122  8:43:42 InnoDB: Using Linux native AIO
^G/usr/sbin/mysqld: Can't create/write to file '/tmp/ibv0Dwa6' (Errcode: 13)
160122  8:43:42  InnoDB: Error: unable to create temporary file; errno: 13
160122  8:43:42 [ERROR] Plugin 'InnoDB' init function returned error.
160122  8:43:42 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160122  8:43:42 [ERROR] Unknown/unsupported storage engine: InnoDB
160122  8:43:42 [ERROR] Aborting

160122  8:43:42 [Note] /usr/sbin/mysqld: Shutdown complete

The permissions for /tmp

drwxr-xr-x   4 root root  4096 Jan 22 08:39 tmp

I also tried

sudo apt-get purge mysql-server-core-5.5 mysql-common

and to reinstall everything new.. But it didn't solve the problem. The socket /etc/mysql/my.cnf exists:

[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket          = /var/run/mysqld/mysqld.sock
nice            = 0

[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
bind-address            = 127.0.0.1
key_buffer              = 16M
max_allowed_packet      = 16M
thread_stack            = 192K
thread_cache_size       = 8
myisam-recover         = BACKUP
query_cache_limit       = 1M
query_cache_size        = 16M
log_error = /var/log/mysql/error.log
expire_logs_days        = 10
max_binlog_size         = 100M
[mysqldump]
quick
quote-names
max_allowed_packet      = 16M
[isamchk]
key_buffer              = 16M
!includedir /etc/mysql/conf.d/

EDIT:

/var/run/mysqld I just saw this doesn't exist. How can I create this?

EDIT2:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

When I try to connect.

0
1

The answer from Phil is the solution:

/tmp should be chmod'ed to 777 – Phil 2 days ago

sudo chmod 777 /tmp

(I can not set a comment as answer, so maybe some mod can change my answer to his?)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.