首页>>帮助中心>>vps云服务器linux中mysql初始化失败

vps云服务器linux中mysql初始化失败

2023/4/9 945次
我们在linux中安装mysql时遇到的一些报错
问题报错:

mysqld: error while loading shared libraries: libnuma.so.1: cannotopen shared object file: No such file or directory

解决方案:

这个报错是因为缺少了 numactl 如果是centos系统直接安装即可

yum -y install numactl

报错信息:

Job for mysqld.service failed because the control process exited witherror code

解决方案:

这个报错因为 /var/lib/mysql 这个路径已经存在/var/lib/mysql,所以无法初始化,删除/var/lib/mysql 后重启Mysql服务即可

删除:

mkdir /var/lib/mysql

chown mysql:mysql /var/lib/mysql

重启:

systemctl start mysql

如果还是失败报错:

localhost.localdomain setroubleshoot[4576]: SELinux is preventing/usr/libexec/mysqld from getattr access on the file/var/lib/mysql/ibdata1. For complete SELinux messages run: sealert-l>

localhost.localdomain platform-python[4576]: SELinux is preventing/usr/libexec/mysqld from getattr access on the file/var/lib/mysql/ibdata1

是因为SElinux权限导致的

解决:

restorecon -Rv /var/lib/mysql

即可解决问题

版权声明

    声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们996811936@qq.com进行处理。