集群启动问题

在kvm虚机下,启动mariad,日志报如下错误:

 :: [Note] /usr/libexec/mysqld: Shutdown complete

 :: mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
:: mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
:: [Note] /usr/libexec/mysqld (mysqld 5.5.-MariaDB) starting as process ...
:: InnoDB: The InnoDB memory heap is disabled
:: InnoDB: Mutexes and rw_locks use GCC atomic builtins
:: InnoDB: Compressed tables use zlib 1.2.
:: InnoDB: Using Linux native AIO
:: InnoDB: Initializing buffer pool, size = 128.0M
:: InnoDB: Completed initialization of buffer pool
:: InnoDB: highest supported file format is Barracuda.
:: InnoDB: Waiting for the background threads to start
:: Percona XtraDB (http://www.percona.com) 5.5.43-MariaDB-37.2 started; log sequence number 1597945
:: [Note] Plugin 'FEEDBACK' is disabled.
:: [ERROR] Can't create IP socket: Success
:: [ERROR] Aborting :: InnoDB: Starting shutdown...
:: InnoDB: Shutdown completed; log sequence number
:: [Note] /usr/libexec/mysqld: Shutdown complete :: mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
:: mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
:: [Note] /usr/libexec/mysqld (mysqld 5.5.-MariaDB) starting as process ...
:: InnoDB: The InnoDB memory heap is disabled
:: InnoDB: Mutexes and rw_locks use GCC atomic builtins
:: InnoDB: Compressed tables use zlib 1.2.
:: InnoDB: Using Linux native AIO
:: InnoDB: Initializing buffer pool, size = 128.0M
:: InnoDB: Completed initialization of buffer pool
:: InnoDB: highest supported file format is Barracuda.
:: mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
:: [Note] /usr/libexec/mysqld (mysqld 5.5.-MariaDB) starting as process ...
:: InnoDB: The InnoDB memory heap is disabled
:: InnoDB: Mutexes and rw_locks use GCC atomic builtins
:: InnoDB: Compressed tables use zlib 1.2.
:: InnoDB: Using Linux native AIO
:: InnoDB: Initializing buffer pool, size = 128.0M
:: InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
:: InnoDB: Setting file ./ibdata1 size to MB
InnoDB: Database physically writes the file full: wait...
:: InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to MB
InnoDB: Database physically writes the file full: wait...
:: InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
:: InnoDB: Waiting for the background threads to start
:: Percona XtraDB (http://www.percona.com) 5.5.43-MariaDB-37.2 started; log sequence number 0
:: [Note] Plugin 'FEEDBACK' is disabled.
:: [ERROR] Can't create IP socket: Success
:: [ERROR] Aborting

对应的错误码:  | 1081 | 08S01 | ER_IPSOCK_ERROR| Can't create IP socket

问题: mariadb的配置文件中,bind-address 的值不正确。  /etc/my.cnf  或 /etc/my.cnf.d/*

解决: 设置正确的bind-address值。

http://bbs.chinaunix.net/thread-4193700-1-1.html

清除数据,重新初始化数据库

#rm /etc/my.cnf
#rm -rf /var/lib/mysql
#rm -rf /usr/share/mysql
#rm -rf /usr/lib/mysql
#rm -rf /var/run/mysql/ #mysql_install_db --user=mysql --datadir=/var/lib/mysql/
[root@vStack ~]# mysql_install_db --user=mysql --datadir=/var/lib/mysql
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
:: [Note] /usr/libexec/mysqld (mysqld 5.5.-MariaDB) starting as process ...
:: [ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13)
:: [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
:: [ERROR] Plugin 'Aria' init function returned error.
:: [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
:: [ERROR] mysqld: Can't find file: './mysql/db.frm' (errno: 13)
ERROR: Can't find file: './mysql/db.frm' (errno: 13)
:: [ERROR] Aborting :: [Note] /usr/libexec/mysqld: Shutdown complete Installation of system tables failed! Examine the logs in
/var/lib/mysql for more information. The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing: shell> /usr/bin/scripts/mysql_install_db --defaults-file=~/.my.cnf You can also try to start the mysqld daemon with: shell> /usr/libexec/mysqld --skip-grant --general-log & and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables: shell> /usr/bin/mysql -u root mysql
mysql> show tables; Try 'mysqld --help' if you have problems with paths. Using
--general-log gives you a log in /var/lib/mysql that may be helpful. The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
MariaDB is hosted on launchpad; You can find the latest source and
email lists at http://launchpad.net/maria Please check all of the above before submitting a bug report
at http://mariadb.org/jira

https://www.reddit.com/r/linuxadmin/comments/myy2b/mariadb_fails_to_start_due_to_missing_file_which/

问题:文件权限问题。

修改:chown mysql:mysql -R .   将/var/lib/mysql 下的所有文件、目录的所有者,修改为mysql。

重新启动 mariadb服务器,即可。

mariadb 集群使用的更多相关文章

  1. 负载均衡的mariadb集群搭建

    集群介绍: Galera是一个MySQL(也支持MariaDB,Percona)的同步多主集群软件,目前只支持InnoDB引擎. 主要功能: 同步复制 真正的multi-master,即所有节点可以同 ...

  2. MariaDB Galera Cluster 部署(如何快速部署 MariaDB 集群)

    MariaDB Galera Cluster 部署(如何快速部署 MariaDB 集群)  OneAPM蓝海讯通7月3日 发布 推荐 4 推荐 收藏 14 收藏,1.1k 浏览 MariaDB 作为 ...

  3. MariaDB集群Galera Cluster的研究与测试

    MariaDB集群Galera Cluster的研究与测试 Galera Cluster是MariaDB的一个双活多主集群,其可以使得MariDB的所有节点保持同步,Galera为MariaDB提供了 ...

  4. MariaDB Galera Cluster 部署(如何快速部署MariaDB集群)

    MariaDB Galera Cluster 部署(如何快速部署MariaDB集群) [日期:--] 来源:Linux社区 作者:Linux [字体:大 中 小] MariaDB作为Mysql的一个分 ...

  5. 私有云Mariadb集群搭建

    MariaDB作为Mysql的一个分支,在开源项目中已经广泛使用,例如大热的openstack,所以,为了保证服务的高可用性, 同时提高系统的负载能力,集群部署是必不可少的. MariaDB Gale ...

  6. mariadb集群与nginx负载均衡配置--centos7版本

    这里配置得是单nginx主机..先准备4台主机,三台mariadb集群,一台nginx. ------------------------------------------------------- ...

  7. galera mariadb集群恢复策略

    1 galera mariadb首先MariaDB是一个数据库,可以看成是MySQL的一个分支,由于MySQL被SUN收购,所以MySQL面临着闭源的风险,当时MySQL之父Widenius并没有加入 ...

  8. lvs+keepalived+mariadb集群

    1.环境准备节点1:172.16.2.95节点2:172.16.2.160节点3:172.16.2.220LVS1:172.16.2.67LVS2:172.16.2.234 2.mariadb集群的安 ...

  9. openstack私有云布署实践【5 数据库MariaDB 集群】

    kxcontroller1   kxcontroller2  controller1 这3台作角色 确保服务器的域名解析访问正常   确保NTP时间同步   配置HAproxy主备访问,其中的一项数据 ...

  10. mariadb集群配置(主从和多主)

    mariadb主从 主从多用于网站架构,因为主从的同步机制是异步的,数据的同步有一定延迟,也就是说有可能会造成数据的丢失,但是性能比较好,因此网站大多数用的是主从架构的数据库,读写分离必须基于主从架构 ...

随机推荐

  1. [NOIP2015]运输计划(树上差分+LCA+二分)

    Description 公元 2044 年,人类进入了宇宙纪元. L 国有 n 个星球,还有 n−1 条双向航道,每条航道建立在两个星球之间,这 n−1 条航道连通了 L 国的所有星球. 小 P 掌管 ...

  2. Diycode开源项目 SettingActivity分析

    1.整体效果预览及布局分析 1.1.设置界面预览 1.2.主体对应关系 注意这里的线条用ImageView来实现 有一个TextView是检查更新,默认隐藏,具体出现时间还得之后确认. 最后一个Lin ...

  3. 80C51单片机指令的取指、执行时序

    80C51单片机指令的取指.执行时序 现按4类指令介绍CPU时序.因为CPU工作的过程就是取指令与执行指令的过程,所以CPU必须先取出指令,然后才能执行指令. 1.双字节单周期指令 由于双字节单周期指 ...

  4. Maven使用入门

    Maven使用POM文件管理项目资源,pom.xml文件位于项目根目录下,结构如下: <?xml version="1.0" encoding="UTF-8&quo ...

  5. 46、android studio第一次使用时卡在gradle下载怎么解决?

    如果没法FQ或者FQ后网速慢,哥教你一个快速解决方案. 在根目录下的.gradle目录下,找到wrapper/dists目录,如果当前正在下载gradle.x.xx-all.zip,那么会发现grad ...

  6. 【Rotate Image】cpp

    题目: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwis ...

  7. IOS开发学习笔记032-UITableView 的编辑模式

    UITableView 的三种编辑模式 1.删除 2.排序 3.添加 进入编辑模式,需要设置一个参数 - (IBAction)remove:(UIBarButtonItem *)sender { NS ...

  8. apizza导出为html后,从中提取api_name/api_path/api_method,保存到本地,方便根据接口名称得到接口路径与请求方法

    import re import os def open_file(file='c:/newcrm.html'): f=open(file,'r',encoding='utf-8') return f ...

  9. CSU-1908 The Big Escape

    CSU-1908 The Big Escape Description There is a tree-like prison. Expect the root node, each node has ...

  10. 理解机器为什么可以学习(四)---VC Dimension

    前面一节我们通过引入增长函数的上限的上限,一个多项式,来把Ein 和 Eout 的差Bound住,这一节引入VC Bound进一步说明这个问题. 前边我们得到,如果一个hypethesis集是有bre ...