linux mysql数据库启动失败日志 Plugin 'InnoDB' init function returned error.
tail -f /var/log/mysqld.log180613 00:25:32 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
180613 00:28:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
1806130:28:02 option 'table_definition_cache': unsigned value 200 adjusted to 256
1806130:28:02 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=mysqld-bin' to avoid this problem.
/usr/libexec/mysqld: Can't create/write to file '/tmp/ib3fpNK3' (Errcode: 13)
1806130:28:02InnoDB: Error: unable to create temporary file; errno: 13
1806130:28:02 Plugin 'InnoDB' init function returned error.
1806130:28:02 Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
1806130:28:02 /usr/libexec/mysqld: unknown variable 'performance_schema_max_table_instances=200'
1806130:28:02 Aborting
网上搜索,全尼玛是错的,,什么删除ib_logfile0 ib_logfile1都是没有用的。
后来,,还是自己摸索了下,,看上面有个tmp报错?难道说是权限?
chmod 1777 /tmp
给了1777后,发现tmp那行确实没抱错了,,但是数据库还是启动不起来。
通过寻找权限
find /var/lib/ -printf '%m %p\n'
然后重置所有rpm包权限到默认值,,考虑慎用
for p in $(rpm -qa); do rpm --setperms $p; rpm --setugids $p; done
还不行的话
mysqld_safe --skip-grant-table
删除目录下的东西,mysql_install_db --user=mysql
暴力初始化。。 把'/tmp/ib3fpNK3'删了再试试
还不行就检查一下是不是开启了SELINUX Doddyさま 发表于 2018/6/13 21:20
把'/tmp/ib3fpNK3'删了再试试
还不行就检查一下是不是开启了SELINUX
已经好了,,他好像执行了chmod 000 -r /*被破坏权限了!帮他备份重装了 小樱 发表于 2018/6/14 00:50
已经好了,,他好像执行了chmod 000 -r /*被破坏权限了!帮他备份重装了
实力作死...
https://doddy.space/usr/uploads/2018/06/2256295917.jpg
页:
[1]