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

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 ÃüÁîʹÓÃ

mysql ÃüÁîѧϰ£º
1. mysql -uroot  ;
2.mysql -h ip -ubusiusr -pbusiusr newdrmdb;
3.show databases ;                 //ÏÔʾËùÓеÄÊý¾Ý¿â ;
4.show tables ;           ......

mysqlµÄgrantÃüÁî

¹Ø¼ü×Ö: mysql grant
±¾ÎÄʵÀý£¬ÔËÐÐÓÚ MySQL 5.0 ¼°ÒÔÉÏ°æ±¾¡£
MySQL ¸³ÓèÓû§È¨ÏÞÃüÁîµÄ¼òµ¥¸ñʽ¿É¸ÅÀ¨Îª£º
grant ȨÏÞ on Êý¾Ý¿â¶ÔÏó to Óû§
Ò»¡¢grant ÆÕͨÊý¾ÝÓû§£¬²éѯ¡¢²åÈë¡¢¸üС¢É¾³ý Êý¾Ý¿âÖÐËùÓбíÊý¾ÝµÄȨÀû¡£
grant select on testdb.* to common_user@'%'
grant insert on testdb.* to common_user ......

Mysql²éѯ·ÖÒ³

˵Ã÷£ºÕâÊÇÒ»¸öʵÀý£¬ÆäÖÐÓÐЩ¶«Î÷ÊÇ¿ÉÒÔ³éÈ¡³öÀ´µÄ£¬×÷Ϊһ¸ö¹«¹²µÄ·½·¨£¬¿ÉÊÇʵÏÖ¸´ÓÃ
public class TestService {
public static TestService test=null;
public static TestService getTestService(){
if(test==null){
test=new TestService();
}
return test;
}
public List getTest(int pageNo ......

MysqlÖÐcount(*),DISTINCTµÄʹÓ÷½·¨ºÍЧÂÊÑо¿

ÔÚ´¦ÀíÒ»¸ö´óÊý¾ÝÁ¿Êý¾Ý¿âµÄʱºò
ͻȻ·¢ÏÖmysql¶ÔÓÚcount(*)µÄ²»Í¬´¦Àí»áÔì³É²»Í¬µÄ½á¹û
±ÈÈçÖ´ÐÐ
SELECT count(*) from tablename
¼´Ê¹¶ÔÓÚǧÍò¼¶±ðµÄÊý¾ÝmysqlÒ²Äܷdz£Ñ¸Ëٵķµ»Ø½á¹û
¶ø¶ÔÓÚ
SELECT count(*) from tablename WHERE…..
mysqlµÄ²éѯʱ¼ä¿ªÊ¼ÅÊÉý
×Ðϸ²éÔÄÀÛÏÂÊÖ²á,·¢ÏÖµ±Ã»ÓÐWHEREÓï¾ä¶ÔÓÚÕ ......

linuxÏ°²×°mysqlµÄÈýÖÖ·½Ê½

±¾´Î°²×°µÄϵͳƽ̨Ϊ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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ