mariadb 集群使用
集群启动问题
在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 集群使用的更多相关文章
- 负载均衡的mariadb集群搭建
集群介绍: Galera是一个MySQL(也支持MariaDB,Percona)的同步多主集群软件,目前只支持InnoDB引擎. 主要功能: 同步复制 真正的multi-master,即所有节点可以同 ...
- MariaDB Galera Cluster 部署(如何快速部署 MariaDB 集群)
MariaDB Galera Cluster 部署(如何快速部署 MariaDB 集群) OneAPM蓝海讯通7月3日 发布 推荐 4 推荐 收藏 14 收藏,1.1k 浏览 MariaDB 作为 ...
- MariaDB集群Galera Cluster的研究与测试
MariaDB集群Galera Cluster的研究与测试 Galera Cluster是MariaDB的一个双活多主集群,其可以使得MariDB的所有节点保持同步,Galera为MariaDB提供了 ...
- MariaDB Galera Cluster 部署(如何快速部署MariaDB集群)
MariaDB Galera Cluster 部署(如何快速部署MariaDB集群) [日期:--] 来源:Linux社区 作者:Linux [字体:大 中 小] MariaDB作为Mysql的一个分 ...
- 私有云Mariadb集群搭建
MariaDB作为Mysql的一个分支,在开源项目中已经广泛使用,例如大热的openstack,所以,为了保证服务的高可用性, 同时提高系统的负载能力,集群部署是必不可少的. MariaDB Gale ...
- mariadb集群与nginx负载均衡配置--centos7版本
这里配置得是单nginx主机..先准备4台主机,三台mariadb集群,一台nginx. ------------------------------------------------------- ...
- galera mariadb集群恢复策略
1 galera mariadb首先MariaDB是一个数据库,可以看成是MySQL的一个分支,由于MySQL被SUN收购,所以MySQL面临着闭源的风险,当时MySQL之父Widenius并没有加入 ...
- 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集群的安 ...
- openstack私有云布署实践【5 数据库MariaDB 集群】
kxcontroller1 kxcontroller2 controller1 这3台作角色 确保服务器的域名解析访问正常 确保NTP时间同步 配置HAproxy主备访问,其中的一项数据 ...
- mariadb集群配置(主从和多主)
mariadb主从 主从多用于网站架构,因为主从的同步机制是异步的,数据的同步有一定延迟,也就是说有可能会造成数据的丢失,但是性能比较好,因此网站大多数用的是主从架构的数据库,读写分离必须基于主从架构 ...
随机推荐
- JZOJ 5849 d
Description Input Output Data Constraint 做法:考虑贪心使得mina*minb最大,先以a为关键字排序,然后枚举删除最小的0~m个ai,对应删除最小的bi,然后 ...
- pandas知识点(汇总和计算描述统计)
调用DataFrame的sum方法会返还一个含有列的Series: In [5]: df = DataFrame([[1.4,np.nan],[7.1,-4.5],[np.nan,np.nan],[0 ...
- Face The Right Way POJ - 3276 (开关问题)
Face The Right Way Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 6707 Accepted: 312 ...
- Spark性能优化:shuffle调优
调优概述 大多数Spark作业的性能主要就是消耗在了shuffle环节,因为该环节包含了大量的磁盘IO.序列化.网络数据传输等操作.因此,如果要让作业的性能更上一层楼,就有必要对shuffle过程进行 ...
- Redis实现之整数集合
整数集合 整数集合(insert)是集合键的底层实现之一,当一个集合只包含整数值元素,并且这个集合的元素数量不多时,Redis就会使用整数集合作为集合键的底层实现.举个栗子,如果我们创建一个只包含五个 ...
- day10 消息队列,多进程和多线程以及协程,异步IO,事件驱动等
回顾一下线程和进程 线程与进程的区别 守护线程: 队列: 两种方式: 先进先出 # 后入先出 #卖水果,后来的来的是新的 生产者消费者模型: 生产包子, 吃包子 事件 event: 红绿灯模型 ...
- Web前端知识体系V0.1
学习,是一个建立“索引”的过程-好比我们读一本书,读完之后,再次看这本书的目录结构,就会联想起很多书中的具体内容: 博客,是一个回顾所学的载体-学习完教学Video之后,通过书写博客,以达到记忆的目的 ...
- 菜鸟之路——机器学习之Kmeans聚类个人理解及Python实现
一些概念 相关系数:衡量两组数据相关性 决定系数:(R2值)大概意思就是这个回归方程能解释百分之多少的真实值. Kmeans聚类大致就是选择K个中心点.不断遍历更新中心点的位置.离哪个中心点近就属于哪 ...
- Unity 脚本<1>
RaycastHit2D hit = Physics2D.Linecast(targetPosition, targetPosition + new Vector2(x, y)); 猜测是lineca ...
- vmware安装centos7 安装redis windows7访问redis
1.在windows7中安装vmware 2.在vmware中安装centos7 3.禁用centos7自带的firewalld.service 4.安装iptables防火墙 5.安装Redis 3 ...