文档章节

Cloudera 5.2安装MySQL Database及my.cnf配置

月下独酌100
 月下独酌100
发布于 2014/11/17 19:09
字数 479
阅读 27
收藏 0
[mysqld]
transaction-isolation = READ-COMMITTED
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links = 0

key_buffer = 16M
key_buffer_size = 32M
max_allowed_packet = 32M
thread_stack = 256K
thread_cache_size = 64
query_cache_limit = 8M
query_cache_size = 64M
query_cache_type = 1

max_connections = 550

#log_bin should be on a disk with enough free space. Replace '/var/lib/mysql/mysql_binary_log' with an appropriate path for your system.
#log_bin=/var/lib/mysql/mysql_binary_log
#expire_logs_days = 10
#max_binlog_size = 100M

# For MySQL version 5.1.8 or later. Comment out binlog_format for older versions.
binlog_format = mixed

read_buffer_size = 2M
read_rnd_buffer_size = 16M
sort_buffer_size = 8M
join_buffer_size = 8M

# InnoDB settings
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit  = 2
innodb_log_buffer_size = 64M
innodb_buffer_pool_size = 4G
innodb_thread_concurrency = 8
innodb_flush_method = O_DIRECT
innodb_log_file_size = 512M

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

    http://www.cloudera.com/content/cloudera/en/documentation/core/latest/topics/cm_ig_mysql.html#cmig_topic_5_5



全文如下:

  1. Move old InnoDB log files /var/lib/mysql/ib_logfile0 and /var/lib/mysql/ib_logfile1 out of /var/lib/mysql/ to a backup location.

  2. Determine the location of the option file, my.cnf.

  3. Update my.cnf so that it conforms to the following requirements:Here is a typical option file:

    • Small clusters (fewer than 50 hosts) - You can store more than one database (for example, both the Activity Monitor and Service Monitor) on the same host. If you do this, you should:

    • Large clusters (more than 50 hosts) - Do not store more than one database on the same host. Use a separate host for each database/host pair. The hosts need not be reserved exclusively for databases, but each database should be on a separate host.

    • Put each database on its own storage volume.

    • Allow 100 maximum connections for each database and then add 50 extra connections. For example, for two databases, set the maximum connections to 250. If you store five databases on one host (the databases for Cloudera Manager Server, Activity Monitor, Reports Manager, Cloudera Navigator, and Hive Metastore), set the maximum connections to 550.

    • To prevent deadlocks, set the isolation level to read committed.

    • Configure the InnoDB engine. Cloudera Manager will not start if its tables are configured with the MyISAM engine. (Typically, tables revert to MyISAM if the InnoDB engine is misconfigured.) To check which engine your tables are using, run the following command from the MySQL shell:

      mysql> show table status;
    • The default settings in the MySQL installations in most distributions use conservative buffer sizes and memory usage. Cloudera Management Service roles need high write throughput because they might insert many records in the database. Cloudera recommends that you set the innodb_flush_method property to O_DIRECT.

    • Set the max_connections property according to the size of your cluster:

    • Binary logging is not a requirement for Cloudera Manager installations. Binary logging provides benefits such as MySQL replication or point-in-time incremental recovery after database restore. Examples of this configuration follow. For more information, see The Binary Log.


© 著作权归作者所有

共有 人打赏支持
月下独酌100
粉丝 26
博文 220
码字总数 56475
作品 0
浦东
高级程序员
Cloudera Manager 4.8和 CDH 4。6 安装完全手册。

系统环境   操作系统:CentOS 6.5   Cloudera Manager 版本:4.8.1   CDH版本:4.5.0 各机器准备工作:   yum -y groupinstall "Development tools"   yum -y install wget Cloud...

SANSOM
2014/04/01
0
0
centos64安装CDH

软件包:百度云盘D - software - CDH 安装包下载地址: cloudera-manager-el6-cm5.1.3x8664.tar http://archive.cloudera.com/cm5/cm/5/ cdh安装包 http://archive.cloudera.com/cdh5/parce......

Zero零_度
2016/03/04
92
0
CDH 5.7.0 安装文档

一、实验环境 1. IP和主机名和域名,所有主机都可以连接互联网 10.0.70.242 hadoop1 hadoop1.com 10.0.70.243 hadoop2 hadoop2.com 10.0.70.230 hadoop3 hadoop3.com 10.0.70.231 hadoop4 ha......

周新宇1991
2016/11/16
0
0
CDH5.9.0离线部署

部署环境:win7+vmware11+centos7.2+cdh5.9.0 1) 关闭防火墙 –# firewall-cmd –state –# systemctl stop firewalld.service –# systemctl disable firewalld.service –# vi /etc/selin......

thinkpadshi
2017/08/21
0
0
LNMP 下 MYSQL 主从 配置

经过一连串的学习,今天配置了一下 MYSQL 主从配置,在两台LNMP下成功配置,以下是自己结合网站的一些教程的总结。 一、环境 主机: master操作系统:centos 5.2 IP:192.168.70.129 MySQL版...

hengfeng_su
2012/09/21
0
0

没有更多内容

加载失败,请刷新页面

加载更多

macOs-挂载能读写的NTFS硬盘

转自:https://nicklinyi.gitee.io/blog/2018/04/macOS-ntfs.html Mac本身是支持NTFS写入的,只是NTFS是微软开发,由于版权和技术细节原因,苹果不愿公开说自己支持NTFS写入,也是有自己以后...

北风刮的不认真了
10分钟前
1
0
Namespace 命名空间

命名空间可以定义为一种封装方式。 为了解决开发中库和程序中可重用类和方法问题: 1.解决 PHP内部方法类/方法/常量 或者第三方 类/方法/常量之间的命名冲突 2.能够简化为了防止命名冲突而给...

忙碌的小蜜蜂
12分钟前
0
0
CDH的坑之Deploy Client Configuration Failed

Deploy Client Configuration Failed 1.问题描述 当使用CDH增添spark服务的时候,出现了以下错误: Faile to deploy client configuration to the cluster. 具体如下图: 2.思路 网上查了...

星汉
13分钟前
1
0
java guava 集合的操作:交集、差集、并集

Guava:google的工程师利用传说中的“20%时间”开发的集合库,它是对jdk提供的扩展,提供了很多实用的类来简化代码。 开源地址:https://github.com/google/guava jar包下载:http://maven....

帅的不像男的
14分钟前
1
0
从八个层面比较分析 Java 8, RxJava, Reactor

响应式编程在单机环境下是否鸡肋? 结论是:没有结论,我觉得只能抱着怀疑的眼光审视这个问题了。另外还聊到了 RSocket 这个最近在 SpringOne 大会上比较火爆的响应式”新“网络协议,githu...

小刀爱编程
17分钟前
0
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部