Ô¶³Ì²»ÄÜÁ¬½Ómysql½â¾ö·½·¨
Ô¶³ÌÁ¬½ÓÁíһ̨µçÄÔµÄmysqlµÄÊý¾Ý¿âʱ£¬Èç¹ûÁ¬½Ó²»ÉÏ£¬Õâʱºò¾ÍÒªÔÚ±»Á¬½ÓµÄµçÄÔÉÏÖ´ÐÐÒÔÏÂÃüÁ
ÔÒò£ºÊÇûÓиøµÇ¼Óû§ÃûÉèÖÃÔ¶³ÌÖ÷»úµÇ¼µÄȨÏÞ
1¡£µÇ¼mysql £º
Ö´ÐУºmysql -u root -p
2¡£ÐÞ¸Ä MySQL Êý¾Ý¿âÖÐ user ±íÖÐ ¶ÔÓ¦Óû§ÃûµÄ Host ×ֶΣ¬½« localhost ¸ÄΪ %
Ö´ÐУºuse mysql;
ÔÙÖ´ÐУºupdate user set Host = '%' where User = 'username';
È»ºóÖØÆô£ºsudo /etc/init.d/mysql restart
ÕâÑù¾Í¿ÉÒÔÁË
Ïà¹ØÎĵµ£º
DROP PROCEDURE IF exists pro_removeBillRemindByUserId;
create procedure pro_removeBillRemindByUserId(userId int)
begin
declare ts varchar(500);
declare cnt int default 0;
declare f_ID,b int;
DECLARE cur_1 CURSOR ......
MySQL°²×°Ö¸ÄÏ
Òª°²×° MySQL£¬¿ÉÒÔÔÚÖÕ¶ËÌáʾ·ûºóÔËÐÐÏÂÁÐÃüÁ
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install php5-mysql
// °²×°php5-mysql Êǽ«phpºÍmysqlÁ¬½ÓÆðÀ´
Ò»µ©°²×°Íê³É£¬MySQL ·þÎñÆ÷Ó¦¸Ã×Ô¶¯Æô¶¯¡£Äú¿ÉÒÔÔÚÖÕ¶ËÌáʾ·ûºóÔËÐÐÒÔÏÂÃüÁîÀ´¼ì²é MySQL ·þÎñ ......
MySQL count(*) Óë count(col) ²éѯЧÂʱȽÏ
ÓÅ»¯×ܽ᣺
1.ÈκÎÇé¿öÏÂSELECT COUNT(*) from xxx ÊÇ×îÓÅÑ¡Ôñ£»
2.¾¡Á¿¼õÉÙSELECT
COUNT(*) from xxx WHERE COL = ‘xxx’ ÕâÖÖ²éѯ£»
3.¶Å¾øSELECT COUNT(COL) from tablename WHERE COL = ‘xxx’
µÄ³öÏÖ¡£(ÆäÖÐCOL·ÇÖ÷¼ü)
»·¾³£º
MySQL°æ±¾£º ......
ÆÕͨMySQLÔËÐУ¬Êý¾ÝÁ¿ºÍ·ÃÎÊÁ¿²»´óµÄ»°£¬ÊÇ×ã¹»¿ìµÄ£¬µ«Êǵ±Êý¾ÝÁ¿ºÍ·ÃÎÊÁ¿¾çÔöµÄʱºò£¬ÄÇô¾Í»áÃ÷ÏÔ·¢ÏÖMySQLºÜÂý£¬ÉõÖÁdownµô£¬ÄÇô¾ÍÒª¿¼ÂÇÓÅ»¯ÎÒÃǵÄMySQLÁË¡£ÆäÖÐÓÅ»¯MYSQLµÄÒ»¸öÖØÒª»·½Ú¾ÍÊÇΪÊý¾Ý¿â½¨Á¢ÕýÈ·ºÏÀíµÄË÷Òý¡£
Èç¹ûûÓÐË÷Òý£¬Ö´ÐвéѯʱMySQL±ØÐë´ÓµÚÒ»¸ö¼Ç¼¿ªÊ¼É¨ÃèÕû¸ö±íµÄËùÓмǼ£¬Ö±ÖÁÕÒµ½·ûºÏÒ ......
step 1)ÏÂÔØÔ´´úÂë°üµ½±¾µØLinuxÖ÷»ú£¬È»ºó½âѹËõ£¬½øÈë¸ÃĿ¼£¬½øÐÐÅäÖ㬱àÒëºÍ°²×°
ÏÂÔØmysql5Ô´Âëmysql-5.0.18.tar.gzµ½Ä¿Â¼/usr/local
cd /usr/local
tar xzvf mysql-5.0.18.tar.gz
cd mysql-5.0.18
./configure --prefix=/usr/local/mysql
make && make install
make¹ý³Ì»¨µÄʱ¼ä±È½Ï³¤
step 2)ÅäÖÃ
......