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

MySql´´½¨º¯Êý

Ê×ÏÈÐèÒª²é¿´Ò»Ï´´½¨º¯ÊýµÄ¹¦ÄÜÊÇ·ñ¿ªÆô£º
X:\proper\mysql\bin>mysql -h localhost -u root -p
Enter password: **********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 5.0.22-community-nt-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show variables like '%func%';
+-----------------------------------------+-------+
| Variable_name                            | Value |
+-----------------------------------------+-------+
| log_bin_trust_function_creators | ON    |
+-----------------------------------------+-------+
1 row in set (0.02 sec)
Èç¹ûValue´¦ÖµÎªOFF£¬ÔòÐ轫Æä¿ªÆô¡£
mysql> set global log_bin_trust_function_creators=1;
´´½¨º¯Êýʱ£¬ÏÈÑ¡ÔñÊý¾Ý¿â£¬
mysql> use xxx;
Database changed
delimiter $$ÊÇÉèÖà $$ΪÃüÁîÖÕÖ¹·ûºÅ£¬´úÌæ·ÖºÅ£¬ÒòΪ·ÖºÅÔÚbegin...endÖлáÓõ½£»
mysql> delimiter $$
mysql> create function test(t varchar(255))
    -> returns varchar(255)
    -> begin
    -> return left(t,1);
    -> end
    -> $$
Query OK, 0 rows affected (0.13 sec)
º¯Êý´´½¨³É¹¦ºóÐè»Ö¸´·ÖºÅΪÃüÁîÖÕÖ¹·ûºÅ¡£
mysql> delimiter ;
²âÊÔ£º
mysql> select test('alpha');
+----------------+
| test('alpha') |
+---------------+
| a                 |
+---------------+
1 row in set (0.02 sec)
ɾ³ýº¯Êý£º
mysql> drop function test;
Query OK, 0 rows affected (0.11 sec)


Ïà¹ØÎĵµ£º

MySQL partition·ÖÇøI

Ò»¡¢        ·ÖÇøµÄ¸ÅÄî
¶þ¡¢        ÎªÊ²Ã´Ê¹Ó÷ÖÇø£¿£¨Óŵ㣩
Èý¡¢        ·ÖÇøÀàÐÍ
ËÄ¡¢        ×Ó·ÖÇø
Îå¡¢        ¶Ô·ÖÇø½øÐÐÐ޸ģ¨Ôö¼Ó¡¢É¾³ý¡¢·Ö½â¡¢ ......

Apache+php+mysqlÔÚwindowsϵݲװÓëÅäÖÃͼ½â

ÏÈ×¼±¸ºÃÈí¼þ£º
·Ö±ðÔÚApache¹Ù·½¡¢php¹Ù·½¡¢mysql¹Ù·½ÏÂÔØ×îлòÎȶ¨°æ±¾
Ò»¡¢°²×°Apache£¬ÅäÖóɹ¦Ò»¸öÆÕÍ¨ÍøÕ¾·þÎñÆ÷
ÔËÐÐÏÂÔØºÃµÄ“apache_2.0.55-win32-x86-no_ssl.msi”£¬³öÏÖÈçϽçÃæ£º
 
 
³öÏÖApache HTTP Server 2.0.55µÄ°²×°Ïòµ¼½çÃæ£¬µã“Next”¼ÌÐø
 
 
È·È ......

mysqlÖÐGROUP BY½áºÏGROUP_CONCATµÄʹÓà [ת]

http://javeye.javaeye.com/blog/558093
ÎÒÃÇÖªµÀ£¬group by¿ÉÒÔ½«sql²éѯ½á¹û°´ÕÕgroup byºóÃæÁнøÐзÖÀàÏÔʾ¡£±ÈÈ磺
Sql´úÂë
select
 columnA,columnB 
from
 
table
 
group
 
by
 columnA,columnB  
select columnA,columnB from table group by columnA,colum ......

¡¾×ª¡¿mysqlÏÂÈçºÎÖ´ÐÐsql½Å±¾

Ê×Òª²½Öè(Ò»°ã¿ÉÊ¡ÂÔ):
¿ªÆômysql·þÎñ(ĬÈÏÊÇ¿ª»úʱ¾Í×Ô¶¯ÔËÐÐÁË):
¿ØÖÆÃæ°å
-->¹ÜÀí¹¤¾ß-->·þÎñ,ÔÚÀïÃæÕÒµ½Ãû³ÆÎªmysqlµÄÏî,Ë«»÷¾Í¿É¿´ËüµÄ·þÎñ״̬ÊÇÆô¶¯»¹ÊÇÍ£Ö¹,°ÑËüÉèΪÆô¶¯
Á¬½Ómysql:
ÔÚÃüÁîÐÐÏÂÊäÈë mysql -h
localhost -u root -p»Ø³µ,È»ºóÊäÈëÃÜÂë¼´¿É;»òÖ±½ÓÔËÐÐmysql×Ô´øµÄÁ¬½Ó¹¤¾ß,È»ºóÊäÈëÃÜÂë¼ ......

MYSQL ±¸Íü¼

MySQL client programs:
mysql
The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 4.5.1, “mysql — The MySQL Command-Line Tool”.
mysqladmin
A client that performs administrative operations, such as crea ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ