mysql´æ´¢¹ý³Ì
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.13 sec)
mysql> use test;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> delimiter $$
mysql> create procedure my_proc1(name varchar(50),out resultName varchar(50))
-> begin
-> set resultName=name;
-> end $$
Query OK, 0 rows affected (0.13 sec)
mysql> create procedure my_proc_if_else(count int,out result varchar(50))
-> begin
-> if (count=0) then
-> set result="the count is zero";
-> elseif (count =1) then
-> set result="the count is one";
-> else
-> set result="the count is the other number";
-> end if;
-> end $$
Query OK, 0 rows affected (0.04 sec)
mysql> create procedure my_proc_loop(countBegin int,out countEnd int)
-> begin
->
Ïà¹ØÎĵµ£º
MysqlÊý¾Ý¿âÊÇÒ»¸ö¶àÓû§£¬¶àÏ̵߳ĹØϵÐÍÊý¾Ý¿â£¬ÊÇÒ»¸ö¿Í»§»ú/·þÎñÆ÷½á¹¹µÄÓ¦ÓóÌÐò¡£ËüÊǶԸöÈËÓû§ºÍÉÌÒµÓû§ÊÇÃâ·ÑµÄ.
¡¡¡¡MysqlÊý¾Ý¿â¾ßÓÐÒÔÏÂÓŵ㣺
¡¡¡¡1.ͬʱ·ÃÎÊÊý¾Ý¿âµÄÓû§µÄÊýÁ¿²»ÊÜÏÞÖÆ
¡¡¡¡2.¿ÉÒÔ±£´æ³¬¹ý5ǧÍòÌõµÄ¼Ç¼
¡¡¡¡3.ÊÇÄ¿Ç°Êг¡ÉÏÏÖÓÐÊý¾Ý¿â²úÆ·ÖÐÔËÐÐËÙ¶È×î¿ìµÄÊý¾Ý¿âϵͳ
¡¡¡¡4.Óû§È¨ÏÞ ......
·ÀÖ¹×¢ÈëµÄ¼¸ÖÖ°ì·¨
ÆäʵÔÀ´¾ÍÊÇÎÒÃÇÐèÒª¹ýÂËһЩÎÒÃdz£¼ûµÄ¹Ø¼ü×ֺͷûºÏÈ磺
Select£¬insert£¬update£¬delete£¬and£¬*£¬µÈµÈ
function inject_check($sql_str) {
return eregi('select|insert|update|delete|\'|\/\*|\*|\.\.\/|\.\/|union|into|load_file
|outfile', $sql_str); & ......
ÎÞÏÞ·ÖÀàÊÇÎÒÃÇ¿ª·¢Öзdz£³£¼ûµÄÓ¦Óã¬ÏñÂÛ̳µÄµÄ°æ¿é£¬CMSµÄÀà±ð£¬Ó¦Óõĵط½Ìرð¶à¡£
ÎÒÃÇ×î³£¼û×î¼òµ¥µÄ·½·¨¾ÍÊÇÔÚMySqlÀïID ,parentID,name£º
ÓŵãÊǼòµ¥£¬½á¹¹¼òµ¥¡£
ȱµãÊÇЧÂʲ»¸ß£¬ÒòΪÿһ´ÎµÝ¹é¶¼Òª²éѯÊý¾Ý¿â£¬¼¸°ÙÌõÊý¾Ý¿âʱ¾Í²»ÊǺܿìÁË£¡
´æ´¢Ê÷ÊÇÒ»ÖÖ³£¼ûµÄÎÊÌ⣬¶àÖÖ½â¾ö·½°¸¡£Ö÷ÒªÓÐÁ½ÖÖ·½·¨£ºÁÚ½Ó±íµ ......
1.´Óhttp://prdownloads.sourceforge.net/mysqldrivercs/MySQLDriverCS-n-EasyQueryTools-3.0.18.exe?downloadÉÏÏÂÔØMySQLDriverCS.
2.°ÑMySQLDriverCS.dll.Ìí¼Óµ½.netµÄ×é¼þ
3.ʹÓ÷½·¨
ÏÂÃæÊÇ´´½¨Ò»¸öÊý¾Ý¿âÁ´½Ó:
ÏÂÃæÊÇ´´½¨Ò»¸öÊý¾Ý¿âÁ´½Ó:
using MySQLDriverCS;
MySQLConnection conn ......
1.CREATE USER
CREATE USER user [IDENTIFIED BY [PASSWORD] 'password']
[, user [IDENTIFIED BY [PASSWORD] 'password']] ...
CREATE USERÓÃÓÚ´´½¨ÐµÄMySQLÕË»§¡£ÒªÊ¹ÓÃCREATE USER£¬Äú±ØÐëÓµÓÐmysqlÊý¾Ý¿âµÄÈ«¾ÖCREATE USERȨÏÞ£¬»òÓµÓÐINSERTȨÏÞ¡£¶ÔÓÚÿ¸öÕË»§£¬CREATE USER»áÔÚûÓÐȨÏÞµÄmysq ......