zoukankan      html  css  js  c++  java
  • mariaDB安装报错

    背景:

      启动时报错:

    mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")'
    Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")

        在error日志中,错误信息:

    170715 19:59:18 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    2017-07-15 19:59:19 139774258145312 [Note] /usr/sbin/mysqld (mysqld 10.1.25-MariaDB) starting as process 4136 ...
    2017-07-15 19:59:19 139774258145312 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    2017-07-15 19:59:19 139774258145312 [Note] InnoDB: The InnoDB memory heap is disabled
    2017-07-15 19:59:19 139774258145312 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2017-07-15 19:59:19 139774258145312 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2017-07-15 19:59:19 139774258145312 [Note] InnoDB: Compressed tables use zlib 1.2.3
    2017-07-15 19:59:19 139774258145312 [Note] InnoDB: Using Linux native AIO
    2017-07-15 19:59:19 139774258145312 [Note] InnoDB: Using SSE crc32 instructions
    2017-07-15 19:59:19 139774258145312 [Note] InnoDB: Initializing buffer pool, size = 2.0G
    2017-07-15 19:59:19 139774258145312 [Note] InnoDB: Completed initialization of buffer pool
    2017-07-15 19:59:19 139774258145312 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 768 pages (rounded down to MB) than specified in the .cnf file: initial 3200 pages, max 0 (relevant if non-zero) pages!
    2017-07-15 19:59:19 139774258145312 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
    2017-07-15 19:59:19 139774258145312 [ERROR] Plugin 'InnoDB' init function returned error.
    2017-07-15 19:59:19 139774258145312 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2017-07-15 19:59:19 139774258145312 [Note] Plugin 'FEEDBACK' is disabled.
    2017-07-15 19:59:19 139774258145312 [ERROR] Unknown/unsupported storage engine: InnoDB
    2017-07-15 19:59:19 139774258145312 [ERROR] Aborting

    起因:修改了/etc/my.cnf的参数innodb_data_file_path = ibdata1:50M:autoextend

    解决方案:删除安装目录下的ibdata1及其相关文件 rm -rvf ib*

  • 相关阅读:
    【车】汽车X40保养
    【Teradata SQL】使用SQL将多个逗号分隔改为一个逗号分隔
    【Teradata】并行操作工具
    【Linux常见问题】SecureCRT 终端连接密钥交换失败错误
    【Linux基础】Linux更改系统IP
    【Teradata】块压缩(ferret工具)
    【Teradata】grouping和rollup窗口函数
    HttpClient之EntityUtils工具类
    MYSQL索引优化之单表示例
    MySQL执行计划示例
  • 原文地址:https://www.cnblogs.com/bury12/p/7184075.html
Copyright © 2011-2022 走看看