易截截图软件、单文件、免安装、纯绿色、仅160KB

MySQL Cluster Multi Computer How To


This section is a “How-To
” that describes the basics
for how to plan, install, configure, and run a MySQL Cluster.
Whereas the examples in
Chapter 3, MySQL Cluster Configuration
provide more in-depth
information on a variety of clustering options and configuration,
the result of following the guidelines and procedures outlined here
should be a usable MySQL Cluster which meets the
minimum
requirements for availability and
safeguarding of data.

This section covers hardware and software requirements; networking
issues; installation of MySQL Cluster; configuration issues;
starting, stopping, and restarting the cluster; loading of a sample
database; and performing queries.

Basic assumptions. 
This How-To
makes the following
assumptions:

The cluster is to be set up with four nodes, each on a separate
host, and each with a fixed network address on a typical
Ethernet network as shown here:

Node
IP Address
Management (MGMD) node
192.168.0.10
MySQL server (SQL) node
192.168.0.20
Data (NDBD) node "A"
192.168.0.30
Data (NDBD) node "B"
192.168.0.40
This may be made clearer in the following diagram:

In the interest of simplicity (and reliability), this
How-To
uses only numeric IP addresses.
However, if DNS resolution is available on your network, it is
possible to use host names in lieu of IP addresses in
configuring Cluster. Alternatively, you can use the
/etc/hosts
file or your operating
system's equivalent for providing a means to do host lookup
if such is available.

Note
A common problem when trying to use host names for Cluster
nodes arises because of the way in which some operating
systems (including some Linux distributions) set up the
system'


相关文档:

How to change max_allowed_packet value in mysql?

 
If you set it in the cnf(it may be my.ini file) you will likely need to restart the server. Optionally, that is a dynamic variable and can be SET GLOBAL or SET SESSION from the command line as well.So just do as follows.
 
mysql>show variables like’max_allowed_packet’; ......

Memcache VS MySQL Query Cache.

记得前天有人问我, Memcache 和 MySQL 自己的 Query Cache 有啥区别? 我这样回答的,前者是山寨中的战斗机,后者是官方的战斗机。
新手回答问题,错了莫怪。哈哈哈。
好像细节上的差别还是有的。
Memcache优点如下:
  1. 理论上可以支撑无限并发业务操作。
  2. 可以启用单独的实例来缓存巨多的数据。(当 ......

MySQL优化总结


表设计方面:
1、字段名尽量简化,不要超过18个字符
2、使用尽量小的数据类型,例如:MEDIUMINT比INT少占用25%空间
3、字段类型应尽量避免设置成可变长度,如:VARCHAR、BLOB、TEXT
4、用于比较的不同字段,应设置相同的类型及长度
5、尽可能将字段声明为NOT NULL,并指定DEFAULT
6、主索引尽可能短
7、仅创建真正 ......

mysql server安装

三. mysql server安装
    ------------------以下为扩展:删除mysql----------------
    删除 mysql
    sudo apt-get autoremove --purge mysql-server-5.0
    sudo apt-get remove mysql-server
    sudo apt-get autoremove mysql- ......

mysql 备份练习

<?php
$db_name="new";
mysql_connect("localhost","root","123456");
mysql_select_db($db_name);
$tb=mysql_list_tables($db_name);
$sql="";
while($query=mysql_fetch_row($tb)){
 $sql="";$table_sql="";
    $sql.= get_table_fn($query[0]);
    get_table_row($que ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号