lishenghan 发表于 2018-10-1 12:21:07

Mysql报错 :Unknown table engine 'InnoDB'

  问题:
  zabbix服务器重启后,进入zabbix的web发现登录不进去并且网页报mysql的错误,查看mysql的日之后,发现报错:
  # tail -f /var/log/mysqld.log
  140820 16:24:43 /usr/libexec/mysqld: ready for connections.
  Version: '5.1.73'socket: '/var/lib/mysql/mysql.sock'port: 3306Source distribution
  140917 15:03:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
  /usr/libexec/mysqld: Can't create/write to file '/tmp/ibEdFc8d' (Errcode: 13)
  140917 15:03:03InnoDB: Error: unable to create temporary file; errno: 13
  140917 15:03:03 Plugin 'InnoDB' init function returned error.
  140917 15:03:03 Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
  再查看zabbix的日志之后,也发现报错
  #tail -f /tmp/zabbix_server.log
  3545:20140917:154534.090 query failed: Unknown table engine 'InnoDB'
  3545:20140917:154534.090 query failed: Unknown table engine 'InnoDB'
  后百度查询“Unknown table engine 'InnoDB'”的解决办法,一堆文章说需要修改mysql内部设置调整等,心想不会出现mysql内部设置问题,因为就重启了机器发生的问题。后仔细检查mysql报错,看到关键信息“/usr/libexec/mysqld: Can't create/write to file '/tmp/ibEdFc8d' ”,此时查看/tmp的权限,果然是错误的权限,因为机器重启后,/tmp的权限会重置。
  解决办法: chmod 777 /tmp
  就这样,很简单!因为Mysql在启动的时候会在/tmp下创建临时文件和 socket 文件,所以/tmp权限不正确了就会报错

页: [1]
查看完整版本: Mysql报错 :Unknown table engine 'InnoDB'