MySQL Server 5.7无法在Fedora Core 24上启动

时间:2016-08-27 12:08:30

标签: mysql fedora

我在Fedora Core 24上安装了一个相对较新的MySQL 5.7服务器,无法启动。 我已经成功地将datadir从默认位置移动到/ data02 / mysql /并且启动了数据库很多次,甚至从mysqldump加载了7GB数据库。 现在我收到以下错误“mysqld.service的作业失败,因为控制进程退出并显示错误代码。”

MySQL错误日志似乎表明这是问题

  

2016-08-27T04:57:06.855134Z 0 [错误] InnoDB:文件操作中的操作系统错误编号13。

     

2016-08-27T04:57:06.855195Z 0 [错误] InnoDB:错误表示mysqld没有该目录的访问权限。

     

2016-08-27T04:57:06.855201Z 0 [ERROR] InnoDB:os_file_get_status()在'./ibdata1'上失败。无法确定文件权限

     

2016-08-27T04:57:06.855220Z 0 [ERROR] InnoDB:插件初始化中止,错误一般错误

我已经确认:

  1. partition / data02是读/写
  2. chown在/ data02 / mysql中的所有文件上以递归方式设置为mysql:mysql
  3. chmod在/ data02 / mysql上递归设置为755。 注意:我确实尝试过777,但是无法正常工作
  4. pid文件和​​mysql.sock位于应该可写的位置。
  5. 这是显示777权限的目录列表

    [root@localhost data02]# ls -al /data02/mysql
    total 910768
    drwxrwxrwx. 6 mysql mysql      4096 Aug 10 10:35 .
    drwxrwxrwx. 6 root  root       4096 Aug 14 03:19 ..
    -rwxrwxrwx. 1 mysql mysql        56 Aug  4 03:47 auto.cnf
    -rwxrwxrwx. 1 mysql mysql      1680 Aug  4 03:47 ca-key.pem
    -rwxrwxrwx. 1 mysql mysql      1075 Aug  4 03:47 ca.pem
    -rwxrwxrwx. 1 mysql mysql      1079 Aug  4 03:47 client-cert.pem
    -rwxrwxrwx. 1 mysql mysql      1680 Aug  4 03:47 client-key.pem
    -rwxrwxrwx. 1 mysql mysql    485738 Aug 10 10:35 ib_buffer_pool
    -rwxrwxrwx. 1 mysql mysql 817889280 Aug 10 10:40 ibdata1
    -rwxrwxrwx. 1 mysql mysql  50331648 Aug 10 10:38 ib_logfile0
    -rwxrwxrwx. 1 mysql mysql  50331648 Aug 10 10:22 ib_logfile1
    -rwxrwxrwx. 1 mysql mysql  12582912 Aug  4 22:38 ibtmp1
    drwxrwxrwx. 2 mysql mysql      4096 Aug  4 03:47 mysql
    -rwxrwxrwx. 1 mysql mysql         7 Aug  4 03:47 mysql_upgrade_info
    drwxrwxrwx. 2 mysql mysql      4096 Aug  4 03:47 performance_schema
    -rwxrwxrwx. 1 mysql mysql      1680 Aug  4 03:47 private_key.pem
    -rwxrwxrwx. 1 mysql mysql       452 Aug  4 03:47 public_key.pem
    -rwxrwxrwx. 1 mysql mysql      1079 Aug  4 03:47 server-cert.pem
    -rwxrwxrwx. 1 mysql mysql      1676 Aug  4 03:47 server-key.pem
    drwxrwxrwx. 2 mysql mysql     12288 Aug  4 03:47 sys
    drwxrwxrwx. 2 mysql mysql      4096 Aug  4 22:55 test_tmp
    

    这是服务器配置

    [root@localhost data02]# cat /etc/my.cnf.d/community-mysql-server.cnf 
    [server]
    [mysqld]
    datadir=/data02/mysql
    socket=/data02/mysql/mysql.sock
    log-error=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid
    innodb_buffer_pool_size = 5G
    

    我将这个过程作为'root'启动,但它应该启动为'mysql'。 它最后一次工作于8月10日。但是从那时起就关闭了,从那时起就开始运行OS补丁了,但这完全是我所知道的。

    这是执行的启动cmds。

    [root@localhost ~]# systemctl start mysqld
    Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
    [root@localhost ~]# systemctl status mysqld.service
    ● mysqld.service - MySQL 5.7 database server
       Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
       Active: inactive (dead) (Result: exit-code) since Sat 2016-08-27 04:26:52 UTC; 40s ago
      Process: 5100 ExecStart=/usr/libexec/mysqld --daemonize --basedir=/usr --pid-file=/var/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
      Process: 5066 ExecStartPre=/usr/libexec/mysql-prepare-db-dir %n (code=exited, status=0/SUCCESS)
      Process: 5043 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
    
    Aug 27 04:26:52 localhost.localdomain systemd[1]: Failed to start MySQL 5.7 database server.
    Aug 27 04:26:52 localhost.localdomain systemd[1]: mysqld.service: Unit entered failed state.
    Aug 27 04:26:52 localhost.localdomain systemd[1]: mysqld.service: Failed with result 'exit-code'.
    Aug 27 04:26:52 localhost.localdomain systemd[1]: mysqld.service: Service hold-off time over, scheduling restart.
    Aug 27 04:26:52 localhost.localdomain systemd[1]: Stopped MySQL 5.7 database server.
    Aug 27 04:26:52 localhost.localdomain systemd[1]: mysqld.service: Start request repeated too quickly.
    Aug 27 04:26:52 localhost.localdomain systemd[1]: Failed to start MySQL 5.7 database server.
    

0 个答案:

没有答案