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

mysql´´½¨Óû§È¨ÏÞÓï·¨

create database testdb; /* ´´½¨Êý¾Ý¿â */
use testdb; /* ´ò¿ªÊý¾Ý¿â */
/*grant ÆÕͨÊý¾ÝÓû§£¬²éѯ¡¢²åÈë¡¢¸üС¢É¾³ý Êý¾Ý¿âÖÐËùÓбíÊý¾ÝµÄȨÀû*/
grant select,insert,update,delete on testdb.* to common_user@'%';
grant select,insert,update,delete on testdb.* to common_user@'localhost';
/* (.*´ú±íËùÓбí) @ºóµÄ%´ú±íËùÓÐÓû§£¬±¾µØ£¬Ô¶³Ì¶¼¿ÉÒÔͨ¹ýÍøÂç·ÃÎÊ£¬@localhost,@'192.168.1.101' ¼ÓÃÜidentified by '123' */
/* grant Êý¾Ý¿â¿ª·¢ÈËÔ±£¬´´½¨±í¡¢Ë÷Òý¡¢ÊÓͼ¡¢´æ´¢¹ý³Ì¡¢º¯Êý¡£¡£¡£µÈȨÏÞ */
grant create,alter,drop on testdb.* to common_user@localhost; /* grant ´´½¨¡¢Ð޸ġ¢É¾³ý MySQL Êý¾Ý±í½á¹¹È¨ÏÞ¡£ */
grant references on testdb.* to common_user@localhost; /* grant ²Ù×÷ MySQL Íâ¼üȨÏÞ */
grant create temporary tables on testdb.* to common_user@localhost; /* grant ²Ù×÷ MySQL ÁÙʱ±íȨÏÞ */
grant index on testdb.* to common_user@localhost; /* grant ²Ù×÷ MySQL Ë÷ÒýȨÏÞ */
grant create view on testdb.*to common_user@localhost; /* ²Ù×÷ MySQL ÊÓͼ¡¢²é¿´ÊÓͼԴ´úÂë ȨÏÞ */
grant show view on testdb.* to common_user@localhost;
/* grant ²Ù×÷ MySQL ´æ´¢¹ý³Ì¡¢º¯Êý ȨÏÞ */
grant create routine on testdb.* to common_user@localhost;
grant alter routine on testdb.* to common_user@localhost;
grant execute on testdb.* to common_user@localhost;
flush privileges;


Ïà¹ØÎĵµ£º

windows7ϰ²×°apache+php+mysqlÎÊÌâ¼Ç¼

×î½üÐÂÂòÁ˸öµçÄÔ£¬ÏµÍ³ÊÇwindows7£¬window7ÔÚ½çÃæ£¬¹¦ÄÜ·½Ã涼ͦÈÃÈËÂúÒâµÄ£¬¸Ð¾õºÜˬ£¬²»Ë¬µÄÊÇÓÖÒªÖØÐ°²×°»·¾³ÁË¡£
ËùÓÐÈí¼þ¾ù°²×°ÔÚF:\server\ÏÂ
apacheĿ¼£ºF:\server\apache2.2
phpĿ¼£ºF:\server\php
msyqlĿ¼£ºF:\server\mysql
Ò»¡¢°²×°apache
°²×°apacheµÄ°æ±¾ÊÇ£ºhttpd-2.2.15-win32-x86-no_ssl.msi
° ......

£Ûת£ÝmysqlÐ޸ıí½á¹¹alter


 
£Ûת×Ô£Ýhttp://waryist.javaeye.com/blog/104739
ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...]
alter_specification:
        ADD [COLUMN] create_definition [FIRST | AFTER column_name ]
  or    ADD ......

mysqlÓï¾ä

delimiter // ¸Ä±ä½ç¶¨·û Ϊ//
 
ÁгöËùÓÐÊý¾Ý¿â show databases;
ÁгöËùÓÐÊý¾Ý±í show tables;
¸Ä±äÁ¬½ÓÊý¾Ý¿â use databaes
 
 
²åÈë¼Ç¼ insert into users(UserName,Password) values('ivwshjj','123456');
ɾ³ý¼Ç¼ delete from users  ......

mysql·Ö×éÅÅÐò·½°¸

mssql,oracleÖÐ
test񡜧
1 5 abc
2 6 bcd
1 7 ade
2 8 adc
select   a,b,c
from(
select   a,b,c
,row_number()over(partition   by   a   order   by   b   desc)   rn
from   test
) &nb ......

MySQLɳÅÌ——¿ìËٴ³¡¾°

Ô­ÎÄת×Ôhttp://www.mysqlsystems.com/2009/04/mysql_sanbox.html
һȺº£ëàÔÚÊôÓÚ×Ô¼ºµÄº£Ì²ÉÏ×ÔÓɵÄÍæË££¬¾¡¹ÜÖ»ÊÇÒ»¸ö·½ºÐµÄ´óС£¬µ«ÊÇÉ豸һÑù
µÄÆëÈ«£¬Í¬Ñù¿ÉÒÔÍæµÄºÜ¿ªÐÄ£¬Õâ¾ÍÊÇÎÒ½ñÌìҪ˵µÄ——MySQL Sandbox2.0£¬3.0Ò²½«ÒªÍƳö¡£
MySQL
SandboxÊÇÒ»¸ö·Ç³£¼òµ¥¿ì½Ý²¿ÊðMySQL¼¼ÊõµÄÒ»¸ö¹¤¾ßÌ×¼þ£¬Ëü¿É ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ