zoukankan      html  css  js  c++  java
  • CentOS 7.4安装mariadb,启动报错

    [root@iZ25b6alxstZ ~]# systemctl start mariadb
    Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
    [root@iZ25b6alxstZ ~]# systemctl status mariadb

    ● mariadb.service - MariaDB database server
        Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
        Active: failed (Result: exit-code) since Thu 2017-11-30 15:02:35 CST; 4min 10s ago
       Process: 14055 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/F
       Process: 14054 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
       Process: 14024 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCC
      Main PID: 14054 (code=exited, status=0/SUCCESS)

    Nov 30 15:02:34 iZ25b6alxstZ systemd[1]: Starting MariaDB database server...
    Nov 30 15:02:34 iZ25b6alxstZ mariadb-prepare-db-dir[14024]: Database MariaDB is probably initial /var/lib/mysql already, nothing is done.
    Nov 30 15:02:34 iZ25b6alxstZ mysqld_safe[14054]: 171130 15:02:34 mysqld_safe Logging to '/var/lodb/mariadb.log'.
    Nov 30 15:02:34 iZ25b6alxstZ mysqld_safe[14054]: 171130 15:02:34 mysqld_safe Starting mysqld daeh databases from /var/lib/mysql
    Nov 30 15:02:35 iZ25b6alxstZ systemd[1]: mariadb.service: control process exited, code=exited st
    Nov 30 15:02:35 iZ25b6alxstZ systemd[1]: Failed to start MariaDB database server.
    Nov 30 15:02:35 iZ25b6alxstZ systemd[1]: Unit mariadb.service entered failed state.
    Nov 30 15:02:35 iZ25b6alxstZ systemd[1]: mariadb.service failed.

    mysql的报错日志如下:

    [root@iZ25b6alxstZ ~]# grep 'ERROR' /var/log/mariadb/mariadb.log
    171129 11:38:27 [ERROR] Plugin 'InnoDB' init function returned error.
    171129 11:38:27 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    171129 11:38:27 [ERROR] mysqld: Out of memory (Needed 128917504 bytes)
    171129 11:38:27 [ERROR] mysqld: Out of memory (Needed 96681984 bytes)
    171129 11:38:27 [ERROR] Unknown/unsupported storage engine: InnoDB
    171129 11:38:27 [ERROR] Aborting

    根据报错信息,感觉应该是内存不够了,重启了下机器好了

    [root@iZ25b6alxstZ ~]# systemctl status mariadb
    ● mariadb.service - MariaDB database server
        Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
        Active: active (running) since Thu 2017-11-30 15:11:45 CST; 42s ago
       Process: 1218 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
       Process: 1187 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
      Main PID: 1217 (mysqld_safe)
        CGroup: /system.slice/mariadb.service
                ├─1217 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
                └─1380 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql...

    Nov 30 15:11:42 iZ25b6alxstZ systemd[1]: Starting MariaDB database server...
    Nov 30 15:11:42 iZ25b6alxstZ mariadb-prepare-db-dir[1187]: Database MariaDB i...
    Nov 30 15:11:42 iZ25b6alxstZ mysqld_safe[1217]: 171130 15:11:42 mysqld_safe ....
    Nov 30 15:11:42 iZ25b6alxstZ mysqld_safe[1217]: 171130 15:11:42 mysqld_safe ...l
    Nov 30 15:11:45 iZ25b6alxstZ systemd[1]: Started MariaDB database server.
    Hint: Some lines were ellipsized, use -l to show in full.

  • 相关阅读:
    strlen和sizeof的区别
    gdb调试多进程和多线程命令
    (转)Mybatis insert后返回主键给实体对象(Mysql数据库)
    mybatis中使用where in查询时的注意事项
    MySQL IFNULL()函数用法MySQL
    (转)Mysql 多表查询详解
    HTTP的请求方法OPTIONS
    (转)跨域的另一种解决方案——CORS(Cross-Origin Resource Sharing)跨域资源共享
    (转)HTML5开发中Access-Control-Allow-Origin跨域问题
    java maven项目找不到jconsole-1.8.0.jar和tools-1.8.0.jar包
  • 原文地址:https://www.cnblogs.com/zd520pyx1314/p/7929155.html
Copyright © 2011-2022 走看看