mariadb克隆
oracle有克隆安装,事实上mysql/mariadb相似。仅仅需简单几步就能够直接在异机直接启动.
环境:
node01安装完毕的mariadb;
node02一个新机器
如今将node01克隆到node02机器 --1.node02准备环境 #yum remove mysql-libs #yum -y install cmake gcc gcc-c++ autoconf automake zlib* libxml* \
ncurses ncurses-devel libtool-ltdl-devel* make bison bison-devel libaio #groupadd mysql && useradd -g mysql mysql -s /sbin/nologin && echo 'mysql01!@#' |passwd --stdin mysql #vi + /etc/security/limits.conf mysql soft nproc 2047
mysql hard nproc 16384
mysql soft nofile 1024
mysql hard nofile 65536 --2.node01正常关闭数据库 # mysqlshutdownv.sh
mysql port is 33107
close mysql service
--------------------------------------------
mysql shutdown....Wait a minute...
****MYSQL SUCESS CLOSE**** ---3.node01打包 tar czvf mysql.tar.gz /data/ --4.传输到node02 # scp -r -p -P 22 /root/mysql.tar.gz root@192.168.50.160:/backup
The authenticity of host '192.168.50.160 (192.168.50.160)' can't be established.
RSA key fingerprint is 74:5d:47:c0:f8:cf:e7:bb:8c:76:94:4f:0d:6b:ea:c8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.50.160' (RSA) to the list of known hosts.
root@192.168.50.160's password:
mysql.tar.gz 100% 131MB 43.6MB/s 00:03 --5.解压和改动权限 #cd /backup # tar zxvf mysql.tar.gz -C /data/ # ls /data/
data --移动文件夹到上一层
# cd /data/data/ && mv mysql/ ../ && mv ocpyang/ ../ && ls /data/data/ && ls /data/mysql/ && ls /data/ocpyang # rm -rf /data/data #chown -R mysql /data/mysql && chgrp -R mysql /data/mysql --6.链接必要文件 ##链接文件
#ln -fs /data/mysql/my.cnf /etc/my.cnf; ll /etc/my.cnf #cd /data/mysql/&& cp support-files/mysql.server /etc/init.d/mysql && chkconfig mysql on --7.改动my.cnf文件
#vi /etc/my.cnf :%s/node01/node02/g --8.改动环境变量 # vi ~/.bash_profile #ocpyang set
alias date='date "+%Y-%m-%d %H:%M:%S" '
alias mysql="mysql -hlocalhost -uroot -ppassword --auto-rehash --prompt=\"\u@node02 \R:\m:\s>\" "
alias errorlog="cat /data/mysql/mysql_logs/error_log/error.log"
alias mycnf="cd /data/mysql"
export PATH=/data/mysql/scripts:$PATH #source ~/.bash_profile #chmod 755 /data/ocpyang/*
#echo "export PATH=/data/ocpyang:\$PATH">>~/.bash_profile #source ~/.bash_profile --9.启动mysql #chown -R mysql /data/mysql; chgrp -R mysql /data/mysql #/data/mysql/bin/mysqld_safe --datadir='/data/mysql/data' & # mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 10.1.10-MariaDB-log Source distribution Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. root@node02 11:59:21>show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| jinri |
| mysql |
| performance_schema |
| test |
+--------------------+
5 rows in set (0.03 sec)
mariadb克隆的更多相关文章
- 续 CentOS7(mini) 运行MVC5 + Mariadb
上一篇,介绍了在CentOS7上使用mono官方二进制安装包快速安装mono环境 并且成功运行了一个Owin自宿主应用(Booker) 由于Owin自宿主应用不需要System.Web的支持,所以可以 ...
- MariaDB Galera Cluster部署手册
MariaDB Galera Cluster部署手册 galara保证双主数据库的同步及一致性 1.环境准备 基于新部署.最小化安装centos6.5 1> yum install opens ...
- MariaDB CEO 痛斥云厂商从不回馈社区
导读 MariaDB 首席执行官 Michael Howard 表示,亚马逊和 Oracle 将客户牢牢锁定.他还想知道 AWS 是否可能对 AWS MariaDB 实例动手脚,好让 AWS 自己的数 ...
- MariaDB 主从复制
MySQL Replication:NySQL复制,MySQL的复制默认为异步工作模式 mysql的复制功能是mysql内置的,装上它之后就具备了这个功能,而mysql复制是mysql实现大规模 ...
- LAMP 建立 Wordpress 站点 Linux Apache MariaDB PHP
使用LAMP建立Wordpress, 要求如下: 准备工作: VMware 14 CentOS 7.4 最小化 安装镜像 Wordpress 安装包, 下载 预热: 使用VMware新建4台虚拟机, ...
- MySQL/MariaDB数据库的Galera高可用性集群实战
MySQL/MariaDB数据库的Galera高可用性集群实战 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.Galera Cluster概述 1>.什么是Gale ...
- Mariadb/MySQL数据库单表查询基本操作及DML语句
Mariadb/MySQL数据库单表查询基本操作及DML语句 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一数据库及表相关概述 1>.数据库操作 创建数据库: CREATE ...
- 云数据库 MariaDB 版
基于MariaDB企业版全球独家合作认证,提供Oracle兼容性及众多企业级数据库特性.支持包括MySQL InnoDB等多种存储引擎,为不同需求的用户提供灵活的选择. 请看视频简介 优势 Oracl ...
- SQL Server2014 SP2新增的数据库克隆功能
SQL Server2014 SP2新增的数据库克隆功能 创建测试库 --创建测试数据库 create database testtest use testtest go --创建表 )) --插入数 ...
随机推荐
- Codeforces Gym 100015F Fighting for Triangles 状态压缩DP
F Fighting for Triangles Description Andy and Ralph are playing a two-player game on a triangular bo ...
- CodeForces--606A --Magic Spheres(模拟水题)
Magic Spheres Time Limit: 2000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Submi ...
- CaffeNet用于Flickr Style数据集上的风格识别
转自 http://blog.csdn.net/liumaolincycle/article/details/48501423 微调是基于已经学习好的模型的,通过修改结构,从已学习好的模型权重中继续训 ...
- MyEclipse安装TestNG
1.获取TestNG运行包. (1).直接下载*.jar包并导入项目中. (2).maven下载. http://testng.org/doc/download.html 2.为IDE加载TestNG ...
- 学习篇之SVG
学习篇之SVG 一.use重用 与 g组合 xmlns变量实际上指示浏览器如何解释称为SVG的XML方言 <g></g> 组合 <use /> 重用 <ell ...
- Error:Execution failed for task ':app:processDebugManifest'. 合并冲突
1. Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed : Attrib ...
- SpringMVC视频
视频内容: 1.下载spring mvc以及spring mvc示例演示http://pan.baidu.com/s/1kTHRfDH 2.配置完善&初步探究控制器拦截http://pan.b ...
- 聊聊 TCP 中的 KeepAlive 机制
KeepAlive并不是TCP协议规范的一部分,但在几乎所有的TCP/IP协议栈(不管是Linux还是Windows)中,都实现了KeepAlive功能 RFC1122#TCP Keep-Alives ...
- Eclipse中切换GIT分支
切换GIT分支: 右击项目——Team——Switch To——选择你要切换的分支.
- UDP Linux编程(客户端&服务器端)
服务器端 服务器不用绑定地址,他只需要进行绑定相应的监听端口即可. #include <sys/types.h> #include <sys/socket.h> #includ ...