Mysql Êý¾Ý¿â×Ö·û¼¯×ª»»¼°°æ±¾Éý¼¶/½µ¼¶µÄÏêϸ½Ì³Ì
¿´µ½²»ÉÙÓû§·´Ó³×ª»»ÍêÒÔºóÊÇÂÒÂëµÄÇé¿ö,³öÏÖÕâÖÖÏÖÏóµÄÖ÷ÒªÔÒòÊÇÕâÀàÓû§Ê¹ÓõĶ¼ÊÇmysql4.1ÒÔÉϵİ汾.ÏÂÃæ×÷Ò»¸ö˵Ã÷,Ï£Íû³öÏÖÕâ¸öÎÊÌâµÄÅóÓѶ¼ÄÜÄÍÐĵİÑÕâ¸öÎĵµ¿´Íê!!!
MySQL 4.1¿ªÊ¼£¬¶Ô¶àÓïÑÔµÄÖ§³ÖÓÐÁ˺ܴó±ä»¯ (Õâµ¼ÖÂÁËÎÊÌâµÄ³öÏÖ)¡£¾¡¹Ü´ó²¿·ÖµÄµØ·½ (°üÀ¨¸öÈËʹÓúÍÖ÷»úÌṩÉÌ)£¬MySQL 3¡¢4.0 ÈÔȻռÖ÷µ¼µØλ£»µ« MySQL 4.1 ÄËÖÁ5.0ÊÇ MySQL ¹Ù·½ÍƼöµÄÊý¾Ý¿â£¬ÒѾÓÐÖ÷»úÌṩÉÌ¿ªÊ¼Ìṩ²¢½«»áÔ½À´Ô½¶à£»ÒòΪ latin1 ÔÚÐí¶àµØ·½ (ϱ߻áÏêϸÃèÊö¾ßÌåÊÇÄÄЩµØ·½) ×÷ΪĬÈϵÄ×Ö·û¼¯£¬³É¹¦µÄÃɱÎÁËÐí¶à PHP ³ÌÐòµÄ¿ª·¢ÕߺÍÓû§£¬ÑÚ¸ÇÁËÔÚÖÐÎĵÈÓïÑÔ»·¾³Ï»á³öÏÖµÄÎÊÌâ¡£
MySQL 4.1¿ªÊ¼°Ñ¶à¹úÓïÑÔ×Ö·û¼¯·ÖµÄ¸ü¼ÓÏêϸ£¬ËùÒÔµ¼ÖÂÊý¾Ý¿âǨÒÆ£¬»òÔòdzÂÛ̳Éý¼¶µ½4.0ºó£¨dz4.0¿ªÊ¼Ê¹ÓÃgbk»òutf-8±àÂ룩³öÏÖÂÒÂëÎÊÌâ¡£
MySQL 4.1µÄ×Ö·û¼¯Ö§³Ö(Character Set Support)ÓÐÁ½¸ö·½Ã棺×Ö·û¼¯(Character set)ºÍÅÅÐò·½Ê½(Collation)¡£¶ÔÓÚ×Ö·û¼¯µÄÖ§³Öϸ»¯µ½Ëĸö²ã´Î: ·þÎñÆ÷(server)£¬Êý¾Ý¿â(database)£¬Êý¾Ý±í(table)ºÍÁ¬½Ó(connection)¡£
²é¿´ÏµÍ³µÄ×Ö·û¼¯ºÍÅÅÐò·½Ê½µÄÉ趨¿ÉÒÔͨ¹ýÏÂÃæµÄÁ½ÌõÃüÁ
mysql> SHOW VARIABLES LIKE 'character_set_%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
7 rows in set (0.00 sec)
mysql> SHOW VARIABLES LIKE 'collation_%';
+----------------------+-------------------+
| Variable_name | Value |
+----------------------+-------------------+
| collation_connection | latin1_swedish_ci |
| collation_database | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
+----------------------+-------------------+
3 rows in set (0.00 sec)
MySQL 4.1 ¶ÔÓÚ×Ö·û¼¯µÄÖ¸¶¨¿ÉÒÔϸ»¯µ½Ò»Ì¨»úÆ÷ÉÏ°²×°µÄ MySQL£¬ÆäÖеÄÒ»¸öÊý¾Ý¿â£¬ÆäÖеÄÒ»ÕÅ±í£¬ÆäÖеÄÒ»À¸£¬Ó¦¸ÃÓÃʲô×Ö·û¼¯¡£µ«ÊÇ£¬´«Í³µÄ Web ³ÌÐòÔÚ´´
Ïà¹ØÎĵµ£º
mysql ÃüÁîѧϰ£º
1. mysql -uroot ;
2.mysql -h ip -ubusiusr -pbusiusr newdrmdb;
3.show databases ; //ÏÔʾËùÓеÄÊý¾Ý¿â ;
4.show tables ; ......
MySQL °æ±¾£º5.0.45 phpMyAdmin°æ±¾£º2.11.3
Ê×ÏÈ¿´MySQL 5.0²Î¿¼ÊÖ²áÖйØÓÚ´´½¨´æ´¢¹ý³ÌµÄÓ﷨˵Ã÷£º
CREATE
[DEFINER = { user | CURRENT_USER }]
PROCEDURE sp_name ([proc_parameter[,...]])
[characteristic ...] r ......
1:>;create databases newname(ÔÚеÄserverÉϽ¨Á¢¿ÕµÄÊý¾Ý¿â)
2:#/usr/local/mysql/bin/mysqldump databasename >;*.sql(ÔھɵķþÎñÆ÷Éϵ¼³öÊý¾Ý¿â)
3:#/usr/local/mysql/bin/mysql databasename < *.sql(ÔÚеķþÎñÆ÷Éϵ¼Èë*.sql) ......
ÔÚ´¦ÀíÒ»¸ö´óÊý¾ÝÁ¿Êý¾Ý¿âµÄʱºò
ͻȻ·¢ÏÖmysql¶ÔÓÚcount(*)µÄ²»Í¬´¦Àí»áÔì³É²»Í¬µÄ½á¹û
±ÈÈçÖ´ÐÐ
SELECT count(*) from tablename
¼´Ê¹¶ÔÓÚǧÍò¼¶±ðµÄÊý¾ÝmysqlÒ²Äܷdz£Ñ¸Ëٵķµ»Ø½á¹û
¶ø¶ÔÓÚ
SELECT count(*) from tablename WHERE…..
mysqlµÄ²éѯʱ¼ä¿ªÊ¼ÅÊÉý
×Ðϸ²éÔÄÀÛÏÂÊÖ²á,·¢ÏÖµ±Ã»ÓÐWHEREÓï¾ä¶ÔÓÚÕ ......
±¾´Î°²×°µÄϵͳƽ̨Ϊredhat 5
Ò»¡¢Ê¹ÓÃRPM°ü½øÐа²×°
Ê×ÏÈ¿ÉÒÔ´Ó°²×°¹âÅÌÖлòÕßµ½mysqlµÄÍøÕ¾ÉÏÏÂÔضÔÓ¦°æ±¾µÄrpm°üÈçÏ£º
MySQL-server-community-5.1.38-0.rhel5.i386.rpm
MySQL-client-community-5.1.38-0.rhel5.i386.rpm
½Ó×ÅÎÒÃÇ¿ÉÒÔʹÓÃrpmÃüÁî½øÐа²×°£º
rpm -ivh MySQL ......