高性价比开源软件集群(2)--MySQL集群
2007-11-11 16:56:57 来源:WEB开发网核心提示: my.cnf(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />·MySQL(和PHP搭配之最佳组合) 时间函数用法 集合·图形化管理MySQL(和PHP搭配之最佳组合)更轻松·MySQ
my.cnf
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />- ·MySQL(和PHP搭配之最佳组合) 时间函数用法 集合
·图形化管理MySQL(和PHP搭配之最佳组合)更轻松
·MySQL(和PHP搭配之最佳组合)学习点滴
·MySQL(和PHP搭配之最佳组合)常见问题解答及技巧
·远程连接MySQL(和PHP搭配之最佳组合)资料
·MySQL(和PHP搭配之最佳组合) 5.0 新特性教程 存储过程:第三
·在Linux 环境下安装 MySQL(和PHP搭配之最佳组合)
·MySQL(和PHP搭配之最佳组合) 常用命令
·如何安装MySQL(和PHP搭配之最佳组合) 5.0
·MySQL(和PHP搭配之最佳组合)使用基础知识
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># This is for a system with little memory (32M - 64M) where MySQL(和PHP搭配之最佳组合) plays
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># an important part, or systems up to 128M where MySQL(和PHP搭配之最佳组合) is used together with
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># other programs (such as a web server)
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># You can copy this file to
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># /etc/my.cnf to set global options,
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># MySQL(和PHP搭配之最佳组合)-data-dir/my.cnf to set server-specific options (in this
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># installation this directory is /usr/local/MySQL(和PHP搭配之最佳组合)/data) or
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># ~/.my.cnf to set user-specific options.
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># In this file, you can use all long options that a program supports.
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># If you want to know which options a program supports, run the program
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># with the "--help" option.
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># The following options will be passed to all MySQL(和PHP搭配之最佳组合) clients
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />[client]
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#password = your_password
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />port = 3306
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />socket = /tmp/MySQL(和PHP搭配之最佳组合).sock
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># Here follows entries for some specific programs
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># The MySQL(和PHP搭配之最佳组合) server
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />[MySQL(和PHP搭配之最佳组合)d]
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />port = 3306
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />socket = /tmp/MySQL(和PHP搭配之最佳组合).sock
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />skip-locking
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />key_buffer = 16M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />max_allowed_packet = 1M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />table_cache = 64
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />sort_buffer_size = 512K
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />net_buffer_length = 8K
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />read_buffer_size = 256K
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />read_rnd_buffer_size = 512K
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />myisam_sort_buffer_size = 8M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># Don't listen on a TCP/IP port at all. This can be a security enhancement,
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># if all processes that need to connect to MySQL(和PHP搭配之最佳组合)d run on the same host.
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># All interaction with MySQL(和PHP搭配之最佳组合)d must be made via Unix sockets or named pipes.
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># Note that using this option without enabling named pipes on Windows
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># (via the "enable-named-pipe" option) will render MySQL(和PHP搭配之最佳组合)d useless!
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#skip-networking
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># Replication Master Server (default)
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># binary logging is required for replication
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />log-bin=MySQL(和PHP搭配之最佳组合)-bin
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># required unique id between 1 and 2^32 - 1
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># defaults to 1 if master-host is not set
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># but will not function as a master if omitted
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />server-id = 1
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># Replication Slave (comment out master section to use this)
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># To configure this host as a replication slave, you can choose between
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># two methods :
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># 1) Use the CHANGE MASTER TO command (fully described in our manual) -
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># the syntax is:
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># where you replace <host>, <user>, <password> by quoted strings and
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># <port> by the master's port number (3306 by default).
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># Example:
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># MASTER_USER='joe', MASTER_PASSWORD='secret';
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># OR
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># 2) Set the variables below. However, in case you choose this method, then
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># start replication for the first time (even unsuccessfully, for example
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># if you mistyped the password in master-password and the slave fails to
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># connect), the slave will create a master.info file, and any later
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># change in this file to the variables' values below will be ignored and
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># overridden by the content of the master.info file, unless you shutdown
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># the slave server, delete master.info and restart the slaver server.
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># For that reason, you may want to leave the lines below untouched
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># (commented) and instead use CHANGE MASTER TO (see above)
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># required unique id between 2 and 2^32 - 1
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># (and different from the master)
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># defaults to 2 if master-host is set
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># but will not function as a slave if omitted
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#server-id = 2
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># The replication master for this slave - required
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#master-host = <hostname>
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># The username the slave will use for authentication when connecting
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># to the master - required
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#master-user = <username>
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># The password the slave will authenticate with when connecting to
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># the master - required
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#master-password = <password>
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># The port the master is listening on.
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># optional - defaults to 3306
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#master-port = <port>
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># binary logging - not required for slaves, but recommended
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#log-bin=MySQL(和PHP搭配之最佳组合)-bin
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># Point the following paths to different dedicated disks
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#tmpdir = /tmp/
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#log-update = /path-to-dedicated-directory/hostname
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># Uncomment the following if you are using BDB tables
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#bdb_cache_size = 4M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#bdb_max_lock = 10000
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># Uncomment the following if you are using InnoDB tables
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#innodb_data_home_dir = /usr/local/MySQL(和PHP搭配之最佳组合)/data/
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#innodb_data_file_path = ibdata1:10M:autoextend
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#innodb_log_group_home_dir = /usr/local/MySQL(和PHP搭配之最佳组合)/data/
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#innodb_log_arch_dir = /usr/local/MySQL(和PHP搭配之最佳组合)/data/
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># You can set .._buffer_pool_size up to 50 - 80 %
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># of RAM but beware of setting memory usage too high
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#innodb_buffer_pool_size = 16M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#innodb_additional_mem_pool_size = 2M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># Set .._log_file_size to 25 % of buffer pool size
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#innodb_log_file_size = 5M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#innodb_log_buffer_size = 8M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#innodb_flush_log_at_trx_commit = 1
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#innodb_lock_wait_timeout = 50
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#add by endall
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />[MySQL(和PHP搭配之最佳组合)d]
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />ndbcluster
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />ndb-connectstring=202.115.138.217
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />[MySQL(和PHP搭配之最佳组合)_cluster]
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />ndb-connectstring=202.115.138.217
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />[MySQL(和PHP搭配之最佳组合)dump]
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />quick
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />max_allowed_packet = 16M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />[MySQL(和PHP搭配之最佳组合)]
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />no-auto-rehash
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" /># Remove the next comment character if you are not familiar with SQL
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />#safe-updates
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />[isamchk]
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />key_buffer = 20M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />sort_buffer_size = 20M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />read_buffer = 2M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />write_buffer = 2M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />[myisamchk]
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />key_buffer = 20M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />sort_buffer_size = 20M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />read_buffer = 2M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />write_buffer = 2M
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />[MySQL(和PHP搭配之最佳组合)hotcopy]
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />interactive-timeout
(和PHP搭配之最佳组合)集群(图二)" width="11" height="16" />
注意.config.ini中指明了所有的数据节点和SQL节点,它将管理这些地址,数据节点和SQL节点中都指明了管理节点的地址,它们通过它进行与管理节点的通信,但SQL节点中并没有指明数据节点的地址,所以它通过管理节点来与数据节点进程通信.
- ››开源平台Meego和Android之间的对弈
- ››开源的Kingthy.Mail邮件组件库
- ››软件设计模式在JavaScript中的应用
- ››软件视频会议开始展示构架上的强大扩展能力 ——评...
- ››开源飞信Openfetion最新发布v1.8版
- ››软件热点敏感帮助的实现
- ››开源重复数据删除技术纵览
- ››开源的 iPhone 杀手终于到来
- ››开源有优势:Android首超Windows Mobile
- ››开源只不过是个幌子 揭示 Android 的真面目
- ››开源面向对象数据库 db4o 之旅,第 1 部分: 初识 ...
- ››开源面向对象数据库 db4o 之旅,第 2 部分: db4o ...
更多精彩
赞助商链接