设为首页 加入收藏

TOP

MySQLFabric部署(一)
2015-11-21 01:46:04 来源: 作者: 【 】 浏览:0
Tags:MySQLFabric 部署

架构描述:

一台主机上安装4个MySQL 服务,其中一个MySQL服务用于存储MySQL Fabric后台数据;另外3个MySQL服务用于主从架构测试。一个主+两个从。

第一部分:二进制方式安装MySQL 5.6.19

1. 操作系统

CentOS release 6.2 (Final)

2. 创建用户和组

[root@mymaster1 ~]# groupadd mysql

[root@mymaster1 ~]# useradd -r -g mysqlmysql

3. 解压安装包(解压到你想存储数据库数据的地方)

[root@mymaster1 ~]# cd /data

[root@mymaster1 data]# tar -xzvf/root/mysql_soft/mysql-5.6.19-linux-glibc2.5-x86_64.tar.gz

[root@mymaster1 data]# ln -smysql-5.6.19-linux-glibc2.5-x86_64 mysql

4. 查看解压情况

[root@mymaster1 data]# ll

总用量 20

lrwxrwxrwx. 1 root root 34 6月 27 15:31 mysql -> mysql-5.6.19-linux-glibc2.5-x86_64

drwxr-xr-x. 13 rootroot 4096 6月 27 15:31 mysql-5.6.19-linux-glibc2.5-x86_64

5. 修改文件夹所属用户和组为mysql:

[root@mymaster1 data]# cd mysql

[root@mymaster1 mysql]# chown -R mysql:mysql.

6. 安装数据库

[root@mymaster1 mysql]#scripts/mysql_install_db --user=mysql --basedir=/data/mysql--datadir=/data/mysql/data

WARNING: The host'mymaster1.localdomain' could not be looked up with /data/mysql/bin/resolveip.

This probably means thatyour libc libraries are not 100 % compatible

with this binary MySQLversion. The MySQL daemon, mysqld, should work

normally with theexception that host name resolving will not work.

This means that youshould use IP addresses instead of hostnames

when specifying MySQLprivileges !

当出现上面警告时,解决方法是:在/etc/hosts配置文件中增加IP地址和主机名的映射

[root@mymaster1 Packages]# cat /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

IP地址 mymaster1.localdomain

正确的提示信息如下:

[root@mymaster1 mysql]#scripts/mysql_install_db --user=mysql --basedir=/data/mysql--datadir=/data/mysql/data

Installing MySQL system tables...2014-06-2716:02:45 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.Please use --explicit_defaults_for_timestamp server option (see documentationfor more details).

2014-06-27 16:02:45 2134 [Note] InnoDB:Using atomics to ref count buffer pool pages

2014-06-27 16:02:45 2134 [Note] InnoDB: TheInnoDB memory heap is disabled

2014-06-27 16:02:45 2134 [Note] InnoDB:Mutexes and rw_locks use GCC atomic builtins

2014-06-27 16:02:45 2134 [Note] InnoDB:Compressed tables use zlib 1.2.3

2014-06-27 16:02:45 2134 [Note] InnoDB:Using Linux native AIO

2014-06-27 16:02:45 2134 [Note] InnoDB:Using CPU crc32 instructions

2014-06-27 16:02:45 2134 [Note] InnoDB:Initializing buffer pool, size = 128.0M

2014-06-27 16:02:45 2134 [Note] InnoDB:Completed initialization of buffer pool

2014-06-27 16:02:45 2134 [Note] InnoDB: Thefirst specified data file ./ibdata1 did not exist: a new database to becreated!

2014-06-27 16:02:45 2134 [Note] InnoDB:Setting file ./ibdata1 size to 12 MB

2014-06-27 16:02:45 2134 [Note] InnoDB:Database physically writes the file full: wait...

2014-06-27 16:02:45 2134 [Note] InnoDB:Setting log file ./ib_logfile101 size to 48 MB

2014-06-27 16:02:46 2134 [Note] InnoDB:Setting log file ./ib_logfile1 size to 48 MB

2014-06-27 16:02:46 2134 [Note] InnoDB:Renaming log file ./ib_logfile101 to ./ib_logfile0

2014-06-27 16:02:46 2134 [Warning] InnoDB:New log files created, LSN=45781

2014-06-27 16:02:46 2134 [Note] InnoDB:Doublewrite buffer not found: creating new

2014-06-27 16:02:46 2134 [Note] InnoDB:Doublewrite buffer created

2014-06-27 16:02:46 2134 [Note] InnoDB: 128rollback segment(s) are active

首页 上一页 1 2 3 4 5 下一页 尾页 1/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇数据库调优教程(十三)MySQL数据.. 下一篇MySQL-5.6.25数据库免安装配置

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: