码迷,mamicode.com
首页 > 数据库 > 详细

mysql服务不能启动,解决方法

时间:2016-04-25 22:55:39      阅读:749      评论:0      收藏:0      [点我收藏+]

标签:解决方法   mysql服务不能启动   

查看mysql日志时出现以下报错

 vi  /home/mysql/var/localhost.localdomain.err
160426  3:07:23 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

160426 03:07:23 mysqld_safe mysqld from pid file /home/mysql/var/localhost.localdomain.pid ended
160426 03:17:25 mysqld_safe Starting mysqld daemon with databases from /home/mysql/var
160426  3:17:26 [Note] Plugin ‘FEDERATED‘ is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
^G/usr/local/mysql/libexec/mysqld: Can‘t create/write to file ‘/tmp/ib1yAlZB‘ (Errcode: 13)
160426  3:17:26  InnoDB: Error: unable to create temporary file; errno: 13
160426  3:17:26 [ERROR] Plugin ‘InnoDB‘ init function returned error.
160426  3:17:26 [ERROR] Plugin ‘InnoDB‘ registration as a STORAGE ENGINE failed.
160426  3:17:26 [ERROR] Can‘t start server : Bind on unix socket: Permission denied
160426  3:17:26 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
160426  3:17:26 [ERROR] Aborting

Can’t create/write to file ‘/tmp/’ (Errcode: 13)

So, let’s see what an error 13 really means:

perror 13

And we see it’s a permission denied error:

[my@server ~]$ perror 13
OS error code 13: Permission denied

The solution?

Set the correct owner and permissions to /tmp by running this commands:

chown root.root /tmp -v
chmod 1777 /tmp -v

Now restart MySQL to test it:

/etc/init.d/mysqld start

That’s all, now your MySQL server should be able to start without any warnings or failures:

[my@server:~]service mysqld start
Starting mysqld:                                           [  OK  ]


本文出自 “脚踏实地向前行” 博客,请务必保留此出处http://343614597.blog.51cto.com/7056394/1767653

mysql服务不能启动,解决方法

标签:解决方法   mysql服务不能启动   

原文地址:http://343614597.blog.51cto.com/7056394/1767653

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!