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

Initial Startup of MySQL Cluster


Starting the cluster is not very difficult after it has been configured. Each cluster node process must be started separately, and on the host where it resides. The management node should be started first, followed by the data nodes, and then finally by any SQL nodes:
On the management host, issue the following command from the system shell to start the management node process:
shell> ndb_mgmd -f /var/lib/mysql-cluster/config.ini
Note
ndb_mgmd
 
must be told where to find its configuration file, using the 
-f
 
or 
--config-file
 
option. (See 
Section 4.4, “ndb_mgmd
— The MySQL Cluster Management Server Daemon”
, for details.)
For additional options which can be used with 
ndb_mgmd
, seeSection 4.23, “Options Common to MySQL Cluster Programs”
.
On each of the data node hosts, run this command to start the 
ndbd
 
process:
shell> ndbd
If you used RPM files to install MySQL on the cluster host where the SQL node is to reside, you can (and should) use the supplied startup script to start the MySQL server process on the SQL node.
If all has gone well, and the cluster has been set up correctly, the cluster should now be operational. You can test this by invoking the 
ndb_mgm
 
management node client. The output should look like that shown here, although you might see some slight differences in the output depending upon the exact version of MySQL that you are using:
shell> ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> SHOW
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.0.30 (Version: 5.1.41-ndb-6.3.31, Nodegroup: 0, Master)
id=3 @192.168.0.40 (Version: 5.1.41-ndb-6.3.31, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.0.10 (Version: 5.1.41-ndb-6.3.31)
[mysqld(API)] 1 node(s)
id=4 @192.168.0.20 (Version:


Ïà¹ØÎĵµ£º

ÈçºÎÐÞ¸ÄMYSQLÊý¾Ý¿âÃÜÂë


Ê×ÏÈÒªÉùÃ÷Ò»µã£¬´ó²¿·ÖÇé¿öÏ£¬ÐÞ¸ÄMySQLÊÇÐèÒªÓÐmysqlÀïµÄrootȨÏ޵ģ¬
ËùÒÔÒ»°ãÓû§ÎÞ·¨¸ü¸ÄÃÜÂ룬³ý·ÇÇëÇó¹ÜÀíÔ±¡£
·½·¨Ò»
ʹÓÃphpmyadmin£¬ÕâÊÇ×î¼òµ¥µÄÁË£¬ÐÞ¸Ämysql¿âµÄuser±í£¬
²»¹ý±ðÍüÁËʹÓÃPASSWORDº¯Êý¡£
·½·¨¶þ
ʹÓÃmysqladmin£¬ÕâÊÇÇ°ÃæÉùÃ÷µÄÒ»¸öÌØÀý¡£
mysqladmin -u root -p password mypas ......

mysqlºÍsqlserverÖв鿴µ±Ç°¿âÖÐËùÓбíºÍ×Ö¶ÎÐÅÏ¢

>>mysql:
1¡¢²é¿´ËùÓбíÃû£º
show tables [from db_name];
2¡¢²é¿´×Ö¶ÎÐÅÏ¢
SHOW FULL COLUMNS from db_name.table_name
»ñÈ¡ÒÔÏÂÐÅÏ¢
Field £º×Ö¶ÎÃû
Type£º×Ö¶ÎÀàÐÍ
Collation£º×Ö·û¼¯ £¨mysql 5.0ÒÔÉÏÓУ©
Null £ºÊÇ·ñ¿ÉÒÔΪNULL
Key£ºË÷Òý£¨PRI,unique,index)
Default£ºÈ±Ê¡Öµ
Extra£º¶îÍ⣨ÊÇ·ñ aut ......

mysql forige key


Love in coding...
    Free and Susan
[Òý]MySQL INNODBÀàÐͱíµÄÍâ¼ü¹ØÁªÉèÖÃ

Here is a simple example that relates parent and child tables through a single-column foreign key:
CREATE TABLE parent (id INT NOT NULL,
          ......

MySQL´æ´¢ÒýÇæ Ó¦ÓÃ


MySQL·þÎñÆ÷²ÉÓÃÁËÄ£¿é»¯·ç¸ñ£¬¸÷²¿·ÖÖ®¼ä±£³ÖÏà¶Ô¶ÀÁ¢£¬ÓÈÆäÌåÏÖÔÚ´æ´¢¼Ü¹¹ÉÏ¡£´æ´¢ÒýÇ渺Ôð
¹ÜÀíÊý¾Ý´æ´¢£¬ÒÔ¼°MySQLµÄË÷Òý¹ÜÀí¡£Í¨¹ý¶¨ÒåµÄAPI£¬MySQL·þÎñÆ÷Äܹ»Óë´æ´¢ÒýÇæ½øÐÐͨÐÅ¡£Ä¿Ç°Ê¹ÓÃ×î¶àµÄÊÇMyISAMºÍInnoDB¡£
InnoDB±»OracleÊÕ¹ººó£¬MySQL×ÔÐпª·¢µÄд洢ÒýÇæFalcon½«ÔÚMySQL6.0°æ±¾Òý½ø¡£
MyISAMÒýÇæÊÇÒ ......

ת MYSQLÖеÄmy.ini»òmy.cnfÅäÖÃ˵Ã÷

mysqld³ÌÐò--Ŀ¼ºÍÎļþ
basedir = path ʹÓøø¶¨Ä¿Â¼×÷Ϊ¸ùĿ¼(°²×°Ä¿Â¼)¡£
character-sets-dir = path ¸ø³ö´æ·Å×Å×Ö·û¼¯µÄĿ¼¡£
datadir = path ´Ó¸ø¶¨Ä¿Â¼¶ÁÈ¡Êý¾Ý¿âÎļþ¡£
pid-file = filename Ϊmysqld³ÌÐòÖ¸¶¨Ò»¸ö´æ·Å½ø³ÌIDµÄÎļþ(½öÊÊÓÃÓÚUNIX/Linuxϵͳ); Init-V½Å±¾ÐèҪʹÓÃÕâ¸öÎļþÀïµÄ½ø³ÌID½áÊømysqld½ø ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ