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

ÓÃMySQL´´½¨Êý¾Ý¿âºÍÊý¾Ý¿â±í

1¡¢Ê¹ÓÃSHOWÓï¾äÕÒ³öÔÚ·þÎñÆ÷Éϵ±Ç°´æÔÚʲôÊý¾Ý¿â£º
 
de>de>mysql> SHOW DATABASES; +----------+ | Database | +----------+ | mysql | | test | +----------+ 3 rows in set (0.00 sec)
    2¡¢´´½¨Ò»¸öÊý¾Ý¿âabccs
     mysql> CREATE DATABASE abccs;
     ×¢Òⲻͬ²Ù×÷ϵͳ¶Ô´óСдµÄÃô¸Ð¡£
    3¡¢Ñ¡ÔñÄãËù´´½¨µÄÊý¾Ý¿â
     mysql> USE abccs
     Database changed
     ´ËʱÄãÒѾ­½øÈëÄã¸Õ²ÅËù½¨Á¢µÄÊý¾Ý¿âabccs.
    4¡¢ ´´½¨Ò»¸öÊý¾Ý¿â±í
     Ê×ÏÈ¿´ÏÖÔÚÄãµÄÊý¾Ý¿âÖдæÔÚʲô±í£º
     mysql> SHOW TABLES;
     Empty set (0.00 sec)
     ˵Ã÷¸Õ²Å½¨Á¢µÄÊý¾Ý¿âÖл¹Ã»ÓÐÊý¾Ý¿â±í¡£ÏÂÃæÀ´´´½¨Ò»¸öÊý¾Ý¿â±ímytable:
     ÎÒÃÇÒª½¨Á¢Ò»¸öÄ㹫˾Ա¹¤µÄÉúÈÕ±í£¬±íµÄÄÚÈÝ°üº¬Ô±¹¤ÐÕÃû¡¢ÐԱ𡢳öÉúÈÕÆÚ¡¢³öÉú³ÇÊС£
 
de>de>mysql> CREATE TABLE mytable (name VARCHAR(20), sex CHAR(1), -> birth DATE, birthaddr VARCHAR(20)); Query OK, 0 rows affected (0.00 sec)
     ÓÉÓÚname¡¢birthaddµÄÁÐÖµÊDZ仯µÄ£¬Òò´ËÑ¡ÔñVARCHAR£¬Æ䳤¶È²»Ò»¶¨ÊÇ20¡£¿ÉÒÔÑ¡Ôñ´Ó1µ½255µÄÈκγ¤¶È£¬Èç¹ûÒÔºóÐèÒª¸Ä±äËüµÄ×Ö³¤£¬¿ÉÒÔʹÓÃALTER TABLEÓï¾ä¡££©;ÐÔ±ðÖ»ÐèÒ»¸ö×Ö·û¾Í¿ÉÒÔ±íʾ£º"m"»ò"f"£¬Òò´ËÑ¡ÓÃCHAR(1);birthÁÐÔòʹÓÃDATEÊý¾ÝÀàÐÍ¡£
     ´´½¨ÁËÒ»¸ö±íºó£¬ÎÒÃÇ¿ÉÒÔ¿´¿´¸Õ²Å×öµÄ½á¹û£¬ÓÃSHOW TABLESÏÔʾÊý¾Ý¿âÖÐÓÐÄÄЩ±í£º
 
de>de>mysql> SHOW TABLES; +---------------------+ | Tables in menagerie | +---------------------+ | mytables | +---------------------+
    5¡¢ÏÔʾ±íµÄ½á¹¹£º
 
de>de>mysql> DESCRIBE mytable; +-------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-----+---------+-------+ | name | varchar(20) | YES | | NULL | | | sex | char(1) | YES | | NULL | | | bi


Ïà¹ØÎĵµ£º

mysql ÅäÖÃÎļþ

mysqlµÄÅäÖÃÎļþͨ³£ÃüÃûΪmy.cnf,Èç¹û±£´æÔÚĬÈϵÄ/etc/my.cnfĿ¼ÏÂ,ÄÇôÕâÀïÃæµÄÅäÖÃÊÇÈ«¾ÖµÄ,¼È¶Ô´Ë·þÎñÆ÷ÉϵÄËùÓÐmysql·þÎñÆ÷¶¼ÊÇÓÐЧµÄ(Èç¹ûÄãÓÐÔÚЩ·þÎñÆ÷ÉÏ°²×°Á˶à¸ömysql).Èç¹ûÖ»ÊDZ£´æÔÚij¸ömysql·þÎñÆ÷µÄÊý¾ÝĿ¼ÏÂ,ÔòÖ»¶Ô¸Ãmysql·þÎñÆ÷²úÉú×÷ÓÃ.Èç¹ûÊDZ£´æÔÚij¸öÓû§(µ±È»ÊÇmysqlÓû§)µÄhomeĿ¼ÏÂ,ÔòÖ»ÊÇÔÚmy ......

MysqlÖ÷´Ó·þÎñÆ÷µÄÅäÖñʼÇ

×¢: ´ÓMySQL´Ó·þÎñÆ÷µÄ°æ±¾²»ÄÜСÓÚÖ÷·þÎñÆ÷µÄ°æ±¾ ʵÑé»·¾³ Master Mysql·þÎñÆ÷°æ±¾5.1.36,IP:192.168.128.130 Slave Mysql·þÎñÆ÷°æ±¾5.1.36,IP:192.168.128.132 Ò». MySQLÖ÷·þÎñÆ÷ÅäÖà 1.½¨Á¢ÊÚȨÓû§ Ó÷¨:grant replication slave on *.* to ¡®Óû§Ãû¡¯@'Ö÷»ú¡¯ identified by ¡®ÃÜÂ롯; mysql>grant replicatio ......

ÁªºÏMySQL Proxy ºÍMySQL Cluster£¬¹¹½¨¸ßÐÔÄÜÊý¾Ý¿â


ÁªºÏMySQL Proxy ºÍMySQL Cluster£¬¹¹½¨¸ßÐÔÄÜÊý¾Ý¿â
Ô­ÎÄ£ºhttp://blogs.mysql.com/kaj/2007/12/10/combining-mysql-proxy-with-mysql-cluster/
       ²»¾ÃÇ°£¬ÎÒºÍStewart Smith, Vinay Joosery, Monty Taylor ÒÔ¼°ÆäËûµÄmysqlʹÓÃÕߣ¨ËûÃDZÈÎÒ¸üÊìϤMySQL Cluster £©Õ¹¿ªÁËÒ»´ÎÌÖÂÛ£ ......

C# ODBC·ÃÎÊMySQLÊý¾Ý¿â

·Ï»°²»ËµÁË£¬Ö±½Ó½øÈëÖ÷Ì⣬C# ODBC·ÃÎÊMySQLÊý¾Ý¿â£º
1.°²×°Microsoft ODBC.net£ºÎÒ°²×°µÄÊÇmysql-connector-odbc-3.51.22-win32.msi
2.°²×°MDAC 2.7»òÕ߸ü¸ß°æ±¾£ºÎÒ°²×°µÄÊÇmdac_typ.exe 2.7¼òÌåÖÐÎÄ°æ
3.°²×°MySQLµÄODBCÇý¶¯³ÌÐò£ºÎÒ°²×°µÄÊÇ odbc_net.msi
4.¹ÜÀí¹¤¾ß -> Êý¾ÝÔ´ODBC –>ÅäÖÃDSN… ......

MySQLɾ³ýÖ¸¶¨ÐÐ

mysql> select * from tx;
+------+
| id   |
+------+
|    4 |
|    7 |
|    3 |
|    9 |
|    5 |
+------+
5 rows in set (0.05 sec)
mysql> delete a from tx a inner join (select * from tx limit 2,2) b ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ