Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Quick Test Setup of MySQL Cluster


To familiarize you with the basics, we will describe the simplest
possible configuration for a functional MySQL Cluster. After this,
you should be able to design your desired setup from the
information provided in the other relevant sections of this
chapter.

First, you need to create a configuration directory such as
/var/lib/mysql-cluster
, by executing the
following command as the system root
user:

shell> mkdir /var/lib/mysql-cluster
In this directory, create a file named
config.ini
that contains the following
information. Substitute appropriate values for
HostName
and DataDir
as
necessary for your system.

# file "config.ini" - showing minimal setup consisting of 1 data node,
# 1 management server, and 3 MySQL servers.
# The empty default sections are not required, and are shown only for
# the sake of completeness.
# Data nodes must provide a hostname but MySQL Servers are not required
# to do so.
# If you don't know the hostname for your machine, use localhost.
# The DataDir parameter also has a default value, but it is recommended to
# set it explicitly.
# Note: [db], [api], and [mgm] are aliases for [ndbd], [mysqld], and [ndb_mgmd],
# respectively. [db] is deprecated and should not be used in new installations.
[ndbd default]
NoOfReplicas= 1
[mysqld default]
[ndb_mgmd default]
[tcp default]
[ndb_mgmd]
HostName= myhost.example.com
[ndbd]
HostName= myhost.example.com
DataDir= /var/lib/mysql-cluster
[mysqld]
[mysqld]
[mysqld]
You can now start the ndb_mgmd
management
server. By default, it attempts to read the
config.ini
file in its current working
directory, so change location into the directory where the file is
located and then invoke ndb_mgmd
:

shell> cd /var/lib/mysql-cluster
shell> ndb_mgmd
Then start a single data node by running ndbd
:


Ïà¹ØÎĵµ£º

UbuntuÏÂÅäÖÃÍøÂ磬°²×°mysql£¬jdk

sudo apt-get install mysql-server mysql-client
sudo apt-get install sun-java6-jdk(°²×°³öÒâÍ⣬sudo dpkg -P sun-java6-bin£¬È»ºóÖØа²×°)
sudo vi /etc/network/interfaces ÅäÖÃÍøÂç
auto eth0
iface eth0 inet dhcp(static)
address 192.168.8.108
netmask 255.255.255.0
gateway 192.168.8.1
£ºx±£´æ
sud ......

MySQL´´Ê¼ÈË·¢ÓʼþÑ°ÇóÖйú°ïÖú


½ñÔçÊÕµ½ÁËMySQLµÄÓʼþ£¬È«ÎÄÈçÏ£º
Ç×°®µÄÕü¾ÈMySQLµÄÖйúÇ©ÃûÖ§³ÖÕߣ¬
Å·ÃË¿ÉÄÜÎÞ·¨Õü¾ÈMySQL,ÖйúºÍ¶íÂÞ˹¿ÉÄÜÊÇÕü¾ÈMySQLµÄÏ£ÍûÖ®ËùÔÚ¡£ÖйúÓµÓÐÇ¿´ó¡¢¶ÀÁ¢ÒÔ¼°×ÔÐŵķ´Â¢¶ÏÖ÷¹Ü»ú¹Ø£¬Òò´Ë£¬ÎÒ±¾ÈËÔÚ´ËÇëÇóÄúµÄ°ïÖú¡£¶ÔÓÚÄúÔÚhttp://www.helpmysql.org/ru/petitionµÄÇ©Ãû£¬ÎÒÃÇÉî±í¸Ðл¡£Èç¹û¿ÉÒԵĻ°£¬ÎÒÃÇÐèÒªÄúµ ......

MYSQLÒýÇæ¼òµ¥¶Ô±È

·þÎñÆ÷ÒµÎñÀàÐÍ¶Ô±È ÐÔÄÜÆ¿¾±
DB                   I/O´ÅÅÌ
ת·¢·þÎñÆ÷         Íø¿¨PPS
¶¯Ì¬WEBǰ̨         CPU
¾²Ì¬WEBǰ̨   ......

mysql»ù±¾Ó÷¨

http://dev.mysql.com/doc/refman/5.1/zh/index.html
(MySql 5.1 ÖÐÎIJο¼ÊÖ²á)
*------------------------------------------------------------------------------------------
show databases; ÏÔʾÊý¾Ý¿â
drop database Êý¾Ý¿âÃû;ɾ³ýÊý¾Ý¿â
set names 'utf8';ÉèÖÃÊý¾Ý¿â±àÂëΪutf-8
source x:\Êý¾Ý¿âÃû.sql;µ¼È ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ