MySQL主从原理:

一,master记录二进制日志,在每个事务更新数据完成之前,master在二进制日志中记录这些改变、mysql将事务写入二进制日志,即使事务中的语句都是交叉执行的。在事件写入二进制日志完成后,master通知存储引擎提交事务。

二,slave将master的binary log拷贝到它自己的中继日志。首先,slave开始一个工作线程——I/O线程。I/O线程在master上打开一个普通的连接,然后开始binlog dump process。Binlog dump process从master的二进制日志中读取事件,如果已经执行完master产生的所有文件,它会睡眠并等待master产生新的事件。I/O线程将这些事件写入中继日志。

三,SQL slave thread(SQL从线程)处理该过程的最后一步。SQL线程从中继日志读取事件,并重新执行其中的事件而更新slave的数据,使其与master中的数据一致。

主从配置:

  主机名      IP          系统版本             mysql版本    角色

mysqlmaster.cn  10.10.10.69   CentOS Linux release 7.4.1708 (Core)      5.7.20    master

mysqlslave.cn  10.10.10.72   CentOS Linux release 7.4.1708 (Core)       5.7.20    slave

步骤一、主从服务环境初始化

[root@mysqlmaster ~]# iptables -F
[root@mysqlmaster ~]# systemctl stop firewalld
[root@mysqlmaster ~]# systemctl disable firewalld
[root@mysqlmaster ~]# systemctl stop NetworkManager
[root@mysqlmaster ~]# systemctl disable NetworkManager

步骤二,安装mysql 

下载地址:https://downloads.mysql.com/archives/community/

下载相应软件包后解压并把安装包上传到服务器

安装以下软件包,顺序从上到下,注意顺序错误会报错!!!!

mysql-community-common-5.7.20-1.el7.x86_64.rpm 
mysql-community-libs-5.7.20-1.el7.x86_64.rpm 

mysql-community-client-5.7.20-1.el7.x86_64.rpm

mysql-community-server-5.7.20-1.el7.x86_64.rpm 

安装

[root@mysqlmaster ~]# yum -y install mysql-community-common-5.7.20-1.el7.x86_64.rpm
已加载插件:fastestmirror, langpacks
正在检查 mysql-community-common-5.7.20-1.el7.x86_64.rpm: mysql-community-common-5.7.20-1.el7.x86_64
mysql-community-common-5.7.20-1.el7.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 mysql-community-common.x86_64.0.5.7.20-1.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

========================================================================================
Package 架构 版本 源 大小
========================================================================================
正在安装:
mysql-community-common
x86_64 5.7.20-1.el7 /mysql-community-common-5.7.20-1.el7.x86_64 2.5 M

事务概要
========================================================================================
安装 1 软件包

总计:2.5 M
安装大小:2.5 M
Downloading packages:
Running transaction check
Running transaction test

Transaction check error:
file /usr/share/mysql/charsets/swe7.xml from install of mysql-community-common-5.7.20-1.el7.x86_64 conflicts with file from package mariadb-libs-1:5.5.56-2.el7.x86_64

错误概要
-------------

如上所示,出现了错误导致无法安装,但从错误信息可以看到,由于已经安装了mariadb数据库导致无法再安装mysql数据库,那就先把mariadb数据库卸载,

[root@mysqlmaster ~]# yum -y remove mariadb* (主从服务器均要卸载系统自带的mariadb数据库后才能安装mysql)
已加载插件:fastestmirror, langpacks
正在解决依赖关系
--> 正在检查事务
---> 软件包 mariadb-libs.x86_64.1.5.5.56-2.el7 将被 删除
--> 正在处理依赖关系 libmysqlclient.so.18()(64bit),它被软件包 2:postfix-2.10.1-6.el7.x86_64 需要
--> 正在处理依赖关系 libmysqlclient.so.18(libmysqlclient_18)(64bit),它被软件包 2:postfix-2.10.1-6.el7.x86_64 需要
--> 正在检查事务
---> 软件包 postfix.x86_64.2.2.10.1-6.el7 将被 删除
--> 解决依赖关系完成

依赖关系解决

========================================================================================
Package 架构 版本 源 大小
========================================================================================
正在删除:
mariadb-libs x86_64 1:5.5.56-2.el7 @anaconda 4.4 M
为依赖而移除:
postfix x86_64 2:2.10.1-6.el7 @anaconda 12 M

事务概要
========================================================================================
移除 1 软件包 (+1 依赖软件包)

安装大小:17 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在删除 : 2:postfix-2.10.1-6.el7.x86_64 1/2
正在删除 : 1:mariadb-libs-5.5.56-2.el7.x86_64 2/2
验证中 : 1:mariadb-libs-5.5.56-2.el7.x86_64 1/2
验证中 : 2:postfix-2.10.1-6.el7.x86_64 2/2

删除:
mariadb-libs.x86_64 1:5.5.56-2.el7

作为依赖被删除:
postfix.x86_64 2:2.10.1-6.el7

完毕!

[root@xuegodslave ~]# yum -y install mysql-community-common-5.7.20-1.el7.x86_64.rpm
已加载插件:fastestmirror, langpacks
正在检查 mysql-community-common-5.7.20-1.el7.x86_64.rpm: mysql-community-common-5.7.20-1.el7.x86_64
mysql-community-common-5.7.20-1.el7.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 mysql-community-common.x86_64.0.5.7.20-1.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

========================================================================================
Package 架构 版本 源 大小
========================================================================================
正在安装:
mysql-community-common
x86_64 5.7.20-1.el7 /mysql-community-common-5.7.20-1.el7.x86_64 2.5 M

事务概要
========================================================================================
安装 1 软件包

总计:2.5 M
安装大小:2.5 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : mysql-community-common-5.7.20-1.el7.x86_64 1/1
验证中 : mysql-community-common-5.7.20-1.el7.x86_64 1/1

已安装:
mysql-community-common.x86_64 0:5.7.20-1.el7

完毕!

如上所示已经安装成功第一个包,同样的操作把剩下的三个包安装完毕!(主从服务器均进行同样操作)

步骤三,启动MySQL服务,并进行MySQL服务初始化(主从服务器均进行同样操作)

[root@mysqlmaster ~]# systemctl start mysqld

[root@mysqlmaster ~]# grep "password" /var/log/mysqld.log   查询mysql初始密码,
2018-05-12T14:50:13.167604Z 1 [Note] A temporary password is generated for root@localhost: Lil=#:VjS8*Z  (初始密码)

[root@mysqlmaster ~]# mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root:      这里输入:Lil=#:VjS8*Z

The existing password for the user account root has expired. Please set a new password.

New password:    输入新密码  zX@987Weqqrd1

Re-enter new password:   重复一遍确认 zX@987Weqqrd1
The 'validate_password' plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Using existing password for root.

Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : y 修改密码确认

New password:  再次输入  zX@987Weqqrd1

Re-enter new password:  再次输入  zX@987Weqqrd1

Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y 确认修改
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y 移除匿名用户
Success.

Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y 不允许root远程登录
Success.

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y 删除测试数据库
- Dropping test database...
Success.

- Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y 刷新权限表
Success.

All done!

说明:MySQL服务要求密码强度及复杂的都十分严格,如果需要使用简单密码可以修改系统配置文件/etc/my.cnf 加入validate_password=off 然后重启mysql服务进行修改就可以使用简单密码(以上步骤主从服务器均要执行)

步骤四、登录MySQL主服务器,创建一个测试数据库及表,并创建一个授权账号进行主从数据同步

[root@mysqlmaster ~]# mysql -uroot -p'zX@987Weqqrd1'  使用新密码登录mysql
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.20 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

mysql> show databases;  查看当前数据库
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)

mysql> create database test;  创建一个名为test的数据库
Query OK, 1 row affected (0.00 sec)

mysql> show databases; 
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| test |  新建数据库
+--------------------+
5 rows in set (0.00 sec)

mysql> use test;  切换到test数据库

Database changed  
mysql> show tables;  查询当前数据库表
Empty set (0.00 sec)

mysql> create table test1(id int,name varchar(20));  创建一个测试表
Query OK, 0 rows affected (0.03 sec)

mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| test1 |
+----------------+
1 row in set (0.00 sec)

创建授权账号:slave 指定从服务器IP:10.10.10.72  密码:A@*qw92!derS   

mysql> grant replication slave on *.* to slave@10.10.10.72 identified by "A@*qw92!derS";
Query OK, 0 rows affected, 1 warning (0.00 sec)

步骤五、主从服务器配置:

修改master系统配置文件 /etc/my.cnf  末尾加入 一下内容

log-bin=mysql-bin-master    启用二进制日志

server-id=1     本机数据库ID 标示

binlog-do-db=test  可以被从服务器复制的库, 二进制需要同步的数据库名(创建的测试数据库)

binlog-ignore-db=mysql    不可以被从服务器复制的库

[root@mysqlmaster ~]# systemctl restart mysqld  重启数据库服务器

[root@mysqlmaster ~]# mysql -uroot -p'zX@987Weqqrd1'  登录数据库
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.20-log MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

mysql> show master status;  查看数据库状态信息
+-------------------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+-------------------------+----------+--------------+------------------+-------------------+
| mysql-bin-master.000001 | 154 | test | mysql | |
+-------------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)

mysql> show binlog events\G
*************************** 1. row ***************************
Log_name: mysql-bin-master.000001
Pos: 4
Event_type: Format_desc
Server_id: 1
End_log_pos: 123
Info: Server ver: 5.7.20-log, Binlog ver: 4
*************************** 2. row ***************************
Log_name: mysql-bin-master.000001
Pos: 123
Event_type: Previous_gtids
Server_id: 1
End_log_pos: 154
Info:
2 rows in set (0.00 sec)

如上所示,master服务器已配置成功

mysqldump  -uroot -p'zX@987Weqqrd1' test >test.sql  导出master测试数据库test

[root@mysqlmaster ~]# mysqldump -uroot -p'zX@987Weqqrd1' test >test.sql
mysqldump: [Warning] Using a password on the command line interface can be insecure.
[root@mysqlmaster ~]# ll test.sql
-rw-r--r-- 1 root root 1790 5月 13 00:01 test.sql

将导出的数据库传到slave服务器上

[root@mysqlmaster ~]# scp test.sql 10.10.10.72:/root
The authenticity of host '10.10.10.72 (10.10.10.72)' can't be established.
ECDSA key fingerprint is SHA256:cHQticA8/IMXFPFXspEnN0h4FLG7LaXnT8Zpr7ricrA.
ECDSA key fingerprint is MD5:1a:70:c5:60:05:47:6a:75:8a:47:db:85:51:1c:32:2c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.10.10.72' (ECDSA) to the list of known hosts.
root@10.10.10.72's password:
test.sql 100% 1790 1.9MB/s 00:00

配置从服务器

[root@xuegodslave ~]# mysql -uslave -p'A@*qw92!derS' -h 10.10.10.69  在slave服务器上使用授权账号slave登录master mysql测试授权账号能否登录
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.7.20-log MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

mysql> show databases;  
+--------------------+
| Database |
+--------------------+
| information_schema |
+--------------------+
1 row in set (0.00 sec)

 如上所示查询不到test测试数据库

mysql> exit;  退出master数据库
Bye

[root@xuegodslave ~]# mysql -uroot -p'zX@987Weqqrd1'  登录slave服务器,密码初始化与master相同
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.7.20 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.01 sec)

mysql> create database test;  创建测试数据库
Query OK, 1 row affected (0.01 sec)

mysql> exit;  退出数据库
Bye
[root@xuegodslave ~]# mysql -uroot -p'zX@987Weqqrd1' test<test.sql  将master导出的数据库内容导入slave创建的test数据库内
mysql: [Warning] Using a password on the command line interface can be insecure.

[root@xuegodslave ~]# mysql -uroot -p'zX@987Weqqrd1'   登录slave服务器
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.7.20 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| test |
+--------------------+
5 rows in set (0.00 sec)

mysql> use test; 切换到test数据库
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;  查看数据库内容
+----------------+
| Tables_in_test |
+----------------+
| test1 |    已存在master服务器创建的表test1,导入成功
+----------------+
1 row in set (0.00 sec)

mysql> exit;
Bye
[root@xuegodslave ~]# systemctl stop mysqld  停掉slave数据库服务
[root@xuegodslave ~]# vim /etc/my.cnf  编辑slave服务器数据库配置文件末尾添加一行 server-id=2 (从服务器ID号,不要和主ID相同 ,如果设置多个从服务器,每个从服务器必须有一个唯一的server-id值,必须与主服务器的以及其它从服务器的不相同。可以认为server-id值类似于IP地址:这些ID值能唯一识别复制服务器群集中的每个服务器实例。

[root@xuegodslave ~]# systemctl start mysqld  启动mysql服务
[root@xuegodslave ~]# mysql -uroot -p'zX@987Weqqrd1'   登录mysql服务器
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.20 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> stop slave;  停止slave
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> change master to master_host='10.10.10.69',master_user='slave',master_password='change master to master_host='10.10.10.69',master_user='slave',master_password='A@*qw92!derS';  (授权slave服务器同步master,指定账号和密码)
Query OK, 0 rows affected, 2 warnings (0.05 sec)

mysql> start slave;  启动slave
Query OK, 0 rows affected (0.01 sec)

mysql> show slave status \G  查看状态
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 10.10.10.69
Master_User: slave
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin-master.000001
Read_Master_Log_Pos: 448
Relay_Log_File: xuegodslave-relay-bin.000002
Relay_Log_Pos: 675
Relay_Master_Log_File: mysql-bin-master.000001
Slave_IO_Running: Yes  一个负责与主机的io通信

Slave_SQL_Running: Yes  负责自己的slave mysql进程

如上图所示,主从服务器均运行并连接成功

再到主服务器上查看状态:

最后在master服务器中的test数据库中插入数据进行同步测试:

测试成功,主从服务器已成功同步数据!

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

如果遇到主从不同步,看一下主从bin-log的位置,然后再同步。

在主服务器上看二进制日志事件列表

mysql> show binlog events \G

从服务器执行MySQL命令下:

mysql> stop slave;             #先停止slave服务

mysql> change master to master_log_file='mysql-bin-master.000001',master_log_pos=1164;

#根据上面主服务器的show master status的结果,进行从服务器的二进制数据库记录回归,达到同步的效果

mysql>slave start;                      #启动从服务器同步服务

mysql> show slave status\G;          #用show slave status\G;看一下从服务器的同步情况

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

如果都是yes,那代表已经在同步

 

重启从服务器,再查看状态:

停止从服务器slave stop;

开启从服务器slave start;

排错思路:

1、二进制日志没有开启

2、IPTABLES 没有放开端口

3、对应的主机 IP地址写错了

SQL线程出错

1、主从服务器数据库结构不统一

出错后,数据少,可以手动解决创建插入,再更新slave状态。

注:如果主上误删除了。那么从上也就误删除了。  #因此主上要定期做mysqldump备份。

CentOS 7.4 MySQL 5.7.20主从环境搭建(M-S)的更多相关文章

  1. mysql同步之otter/canal环境搭建完整详细版

    接上一篇mysql 5.7多源复制(用于生产库多主库合并到一个查询从库). 这一篇详细介绍otter/canal环境搭建以及当同步出现异常时如何排查.本文主要参考https://blog.csdn.n ...

  2. redis之单机和主从环境搭建

    单机环境搭建 官网http://redis.io/download下载xxx.tar.gz二进制压缩包,注意下载2.8+版本,2.8之前的版本之前从服务器不支持部分重复制,2.6之前的版本不支持set ...

  3. 《Node.js入门》CentOS 6.5下Node.js Web开发环境搭建笔记

    近期想尝试一下英特尔的基于WebRTC协同通信开发套件,所以须要在本地搭建Node.js Web的开发測试环境. 这里讲的是CentOS 下的搭建方法.使用Windows的小伙伴请參考: <No ...

  4. Linux+Apache+Mysql+PHP简单的测试环境搭建

    系统版本为:Linux localhost.localdomain 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x ...

  5. MySQL主从复制以及在本地环境搭建

    MySQL主从复制原理: master(主服务器),slave(从服务器) MySQL master 将数据变更写入二进制日志( binary log, 其中记录叫做二进制日志事binary log ...

  6. Mariadb 10.2.8版本GTID主从环境搭建以及切换

    1.首先搭建主从 主环境:192.168.1.117 从环境:192.168.1.123 a.首先以二进制包的形式安装好MariaDB (忽略不计) b.配置环境的变量 通配 [mysqld] bin ...

  7. mysql 一主多从环境搭建(亲测)

    前期准备 三台服务器,服务器使用的是 centos7 mysql-5.7.24-linux-glibc2.12-x86_64 安装包 使用是版本是 mysql-5.7.24 数据库安装 将 mysql ...

  8. Windows7 QT5.6.0(64位)使用mysql(64位)环境搭建详解

    1 说明 使用环境为:Windows7 VS2015 QT5.6.0(64位),MYSQL 5.7.13(64位). 网上各种错误.模糊.抽象的资料,配置环境花了半天,痛定思痛,总结出来,方便后来人. ...

  9. maven Spring+Spring MVC+Mybatis+mysql轻量级Java web开发环境搭建

    之前一直在做的一个GIS系统项目,采用了jsp+servlet框架,数据传输框架采用了apache的thrift框架,短时多传的风格还不错,但是较其他的java web项目显得有点太臃肿了,现在给大家 ...

随机推荐

  1. iOS树状视图(折叠单元格)详细使用

    RATreeView是一个第三方的iOS树视图(通俗的讲就是折叠单元格),它是对UITableView的封装,定义自己的委托和数据源的法,RATreeView是高度可定制的,并且有很多功能.很多朋友都 ...

  2. URLClassLoader

    package com.reflect.load; import java.net.URL; import java.net.URLClassLoader; import java.sql.Conne ...

  3. Linux系统的shell是什么

    shell是用户和Linux操作系统之间的接口.Linux中有多种shell,其中缺省使用的是Bash.本章讲述了shell的工作原理,shell的种类,shell的一般操作及Bash的特性. 什么是 ...

  4. CentOS 6.X启动流程

    CentOS 6.X启动流程 /boot分区 启动引导程序是默认可以识别boot分区的.因此在系统还无法加载硬盘的时候,boot分区是可以识别的! initramfs内存文件系统 CentOS 6.x ...

  5. 《java入门第一季》之面向对象面试题(继承中构造方法的关系)

    /* 继承中构造方法的关系 A:子类中所有(子类的有参和无参)的构造方法(默认都会访问父类)中(空参数)的构造方法,默认访问父类空参数构造,不默认访问有参数构造 B:为什么呢? 因为子类会继承父类中的 ...

  6. cocos2d-x 游戏开发之有限状态机(FSM) (三)

    cocos2d-x 游戏开发之有限状态机(FSM) (三) 有限状态机简称FSM,现在我们创建一个专门的FSM类,负责管理对象(Monkey)的状态.然后Monkey类就实现了行为与状态分离.Monk ...

  7. Oracle UTL_HTTP(收集汇总有用资料)

    From Oracle The UTL_HTTP package makes Hypertext Transfer Protocol (HTTP) callouts from SQL and PL/S ...

  8. iOS监听模式系列之推送消息通知

    推送通知 和本地通知不同,推送通知是由应用服务提供商发起的,通过苹果的APNs(Apple Push Notification Server)发送到应用客户端.下面是苹果官方关于推送通知的过程示意图: ...

  9. linux服务搭建----ssh服务开启

    //ssh  服务     ssh 192.168.88.254         如何开启   service sshd restart     关掉该服务 servicesshd stop     ...

  10. thrift实现HDFS文件操作

    thrift 文件如下 namespace java com.pera.file.transform struct  File{     1:string path ,     2:string co ...