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主从 主从多用于网站架构,因为主从的同步机制是异步的,数据的同步有一定延迟,也就是说有可能会造成数据的丢失,但是性能比较好,因此网站大多数用的是主从架构的数据库,读写分离必须基于主从架构 ...
随机推荐
- mysql密码正确却提示错误, 不输入密码反而能登录
今天部署阿里云服务器, 发现之前可以连接的mysql服务器突然连接不上了, 密码我确认是正确的,但登录时就是显示密码错误, 很崩溃, 差点气得我就想重装mysql了. 好在经过几番苦寻找到了以下能解决 ...
- Find a path HDU - 5492 (dp)
Find a path Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total ...
- nowcoder N约数个数
n的约数个数 题目:t次询问,每次给你一个数n,求在[1,n]内约数个数最多的数的约数个数 数据:对于100%的数据,t <= 500 , 1 <= n <= 10000000000 ...
- 二分答案:Poweroj2461-入门基础之二分答案(二分法的应用)
传送门:点击打开链接 入门基础之二分答案 Time Limit: 1000 MS Memory Limit: 65536 KBTotal Submit: 179 Accepted: 33 Page V ...
- [BZOJ1503]郁闷的出纳员(Splay)
Description OIER公司是一家大型专业化软件公司,有着数以万计的员工.作为一名出纳员,我的任务之一便是统计每位员工的工资.这本来是一份不错的工作,但是令人郁闷的是,我们的老板反复无常,经常 ...
- Xadmin添加用户小组件出错render() got an unexpected keyword argument 'renderer
环境: Python 3.5.6 Django 2.1 Xadmin 原因: render函数在django2.1上有变化 解决方案: 1.在Python终端输入命令help('xadmin') 查看 ...
- Java面试——多线程面试题总结
)两者都在等待对方所持有但是双方都不释放的锁,这时便会一直阻塞形成死锁. //存放两个资源等待被使用 public class Resource { public static Object obj1 ...
- mysql sum聚合函数和if()函授的联合使用
今天去面试遇到一个数据库试题,首先说一下表结构如下: 表结构:mytest 表数据:mytest 要查询的结果如下: 在本题目中,需要用到sum聚合函数和if函数 sql如下: ,)) ,)) AS ...
- Careercup - Microsoft面试题 - 24308662
2014-05-12 07:31 题目链接 原题: I have heard this question many times in microsoft interviews. Given two a ...
- Github新手使用学习详解
Github新手使用学习详解 (一)git的使用学习 首先下载git bash,安装一路默认选择即可. 安装好后第一步,获取ssh key,即属于自己的密钥: 打开Git bash后输入以下代码: $ ...