51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 2459|回复: 1
打印 上一主题 下一主题

【转载】mysql服务不能启动,解决方法

[复制链接]
  • TA的每日心情
    无聊
    7 小时前
  • 签到天数: 937 天

    连续签到: 4 天

    [LV.10]测试总司令

    跳转到指定楼层
    1#
    发表于 2016-4-27 14:45:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

    查看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 13OS error code 13: Permission denied

    The solution?

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

    chown root.root /tmp -vchmod 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 startStarting mysqld:                                      
    本文出自 “脚踏实地向前行” 博客http://343614597.blog.51cto.com/7056394/1767653
    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-4-25 17:20 , Processed in 0.069141 second(s), 26 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表