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

cmd ÃüÁîÐÐÏÂmysqlµÄ֪ʶ


*************************×Ö·û´®º¯Êý***********************************
mysql> select concat('aa','bb');//×Ö·û´®µÄÁ¬½Ó
mysql> select insert ('beijing2008you',12,3,'me');//×Ö·û´®µÄ²åÈë
+-------------------------------------+
| insert ('beijing2008you',12,3,'me') |
+-------------------------------------+
| beijing2008me                       |
+-------------------------------------+
mysql> select lower('ABC');//´óдת»»³ÉСд
mysql> select upper('abc');//Сдת»»³É´óд
mysql> select left('abcd',2);//×óÈ¡×Ö·û´®
+----------------+
| left('abcd',2) |
+----------------+
| ab             |
+----------------+
mysql> select right('abcd',2);//ÓÒÈ¡×Ö·û´®
mysql> select lpad('2008',20,'beijing');//³¤¶ÈΪ20£¬ÓÃbeijing´Ó×ó±ßÌî³ä¡£
+---------------------------+
| lpad('2008',20,'beijing') |
+---------------------------+
| beijingbeijingbe2008      |
+---------------------------+
mysql> select rpad('2008',20,'beijing');//³¤¶ÈΪ20£¬ÓÃbeijing´ÓÓÒ±ßÌî³ä¡£
mysql> select ltrim('     beijing');//È¥µô×ó±ßµÄ¿Õ¸ñ
mysql> select rtrim('beijing       ');//È¥µôÓұߵĿոñ
mysql> select trim('         beijing       ');//È¥µôÁ½±ßµÄ¿Õ¸ñ
mysql> select repeat('ab',3);//Öظ´'ab'Èý´Î
mysql> select replace('beijing2010','2010','2008');//×Ö·û´®µÄÌæ»»
mysql> select strcmp('a','b');//×Ö·û´®µÄ±È½Ï£¬·µ»ØֵΪ-1,0,1.
mysql> select substring('beijing2008',8,4);//È¡×Ó´®¡£·µ»Ø2008
*******************************ÊýÖµº¯Êý********************************
mysql> select abs(-23);//È¡¾ø¶ÔÖµ
mysql> select ceil(4.5);//·µ»Ø´óÓÚËüµÄÕûÊý
mysql> select floor(4.5);//·µ»ØСÓÚËüµÄÕûÊý
mysql> select mod(3,2);//È¡Ä£
mysql&


Ïà¹ØÎĵµ£º

(ת)mysqlÄÚ´æµ÷ÓÅ

key_buffer_size - Õâ¶ÔMyISAM±íÀ´Ëµ·Ç³£ÖØÒª¡£Èç¹ûÖ»ÊÇʹÓÃMyISAM±í£¬¿ÉÒÔ°ÑËüÉèÖÃΪ¿ÉÓÃÄÚ´æµÄ 30-40%¡£ºÏÀíµÄֵȡ¾öÓÚË÷Òý´óС¡¢Êý¾ÝÁ¿ÒÔ¼°¸ºÔØ¡£
¼Çס£¬MyISAM±í»áʹÓòÙ×÷ϵͳµÄ»º´æÀ´»º´æÊý¾Ý£¬Òò´ËÐèÒªÁô³ö²¿·ÖÄÚ´æ¸øËüÃÇ£¬ºÜ¶àÇé¿öÏÂÊý¾Ý±ÈË÷Òý´ó¶àÁË¡£¾¡¹ÜÈç´Ë£¬ÐèÒª×ÜÊǼì²éÊÇ·ñËùÓÐµÄ key_buffer ¶¼±»ÀûÓÃÁË¡£ ......

[MySQLÓÅ»¯] ÈçºÎ¶¨Î»Ð§Âʽϵ͵ÄSQL


[MySQLÓÅ»¯] -- ÈçºÎ¶¨Î»Ð§Âʽϵ͵ÄSQL
ʱ¼ä:2010-2-28À´Ô´:HaCMS¿ªÔ´ÉçÇø ×÷Õß:zhenpao
Ò»°ãͨ¹ýÒÔÏÂÁ½ÖÖ·½Ê½¶¨Î»Ö´ÐÐЧÂÊ½ÏµÍµÄ SQL Óï¾ä¡£ Âý²éѯÈÕÖ¾ÔÚ²éѯ½áÊøÒÔºó²Å¼Í¼£¬ËùÒÔÔÚÓ¦Ó÷´Ó³Ö´ÐÐЧÂʳöÏÖÎÊÌâµÄʱºò²éѯÂý²éѯÈÕÖ¾²¢²»Äܶ¨Î»ÎÊÌ⣬¿ÉÒÔʹÓà show processlist ÃüÁî²é¿´µ±Ç° MySQL ÔÚ½øÐеÄỊ̈߳¬° ......

Mysql ³£Óú¯Êý


 
Mysql ³£Óú¯Êý
ASCII(str) 
¡¡·µ»Ø×Ö·û´®strµÄµÚÒ»¸ö×Ö·ûµÄASCIIÖµ(strÊÇ¿Õ´®Ê±·µ»Ø0) 
mysql> select ASCII('2'); 
¡¡¡¡-> 50 
mysql> select ASCII(2); 
¡¡¡¡-> 50 
mysql> select ASCII('dete'); 
¡¡¡¡- ......

¼¸ÖÖÆƽâmysql rootÃÜÂëµÄ·½·¨

·½·¨Ò»
ʹÓÃphpmyadmin£¬ÕâÊÇ×î¼òµ¥µÄÁË£¬ÐÞ¸Ämysql¿âµÄuser±í£¬²»¹ý±ðÍüÁËʹÓÃPASSWORDº¯Êý¡£
·½·¨¶þ
ʹÓÃmysqladmin£¬ÕâÊÇÇ°ÃæÉùÃ÷µÄÒ»¸öÌØÀý¡£
mysqladmin -u root -p password mypasswd
ÊäÈëÕâ¸öÃüÁîºó£¬ÐèÒªÊäÈërootµÄÔ­ÃÜÂ룬ȻºórootµÄÃÜÂ뽫¸ÄΪmypasswd¡£
°ÑÃüÁîÀïµÄroot¸ÄΪÄãµÄÓû§Ãû£¬Äã¾Í¿ÉÒÔ¸ÄÄã ......

ÔÚLinuxÏ£¬°²×°Mysql£¨tar£©

# cd /home/tmp (½øÈëѹËõ°üËùÔÚĿ¼)
# groupadd mysql (½¨Á¢mysql×é)
# useradd -g mysql mysql (ÔÚmysql×éÖн¨Á¢mysqlÓû§)
# tar -zxvf mysql-5.0.37.tar.gz (½âѹmysqlÔ´Âë,bz2ѹËõ°üÇëÓÓtar -jvxf ÎļþÃû”Ö¸Áî)
# cd mysql-5.0.37 (½øÈë½âѹĿ¼)
# ./configure --prefix=/usr/local/mysql (p ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ