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

mysqlÎĵµÑ§Ï°3.6

Ô¶³ÌµÇ¼ -h IPµØÖ·
ctrl + d Í˳ö »ò \q »ò quit
select version(); µ±Ç°°æ±¾
current_dateµ±Ç°ÈÕÆÚ »òcurdate() »ò current_date()
SELECT name, birth, curdate(),(year(curdate())-year(birth)) - (right(curdate(),5)<right(birth,5)) as age from ±í ORDER BY name;
year ÌáÈ¡Ä겿·Ö right(curdate(),5)ÌáÈ¡ÓÒÃæµÄ5λ
month()ÔÂ month(curdate())
day() Ìì »òdayofmonth Òâ˼ÊÇÄÃÔÂÀ´ËµµÄÌìÊý
dayofyear() ÄÃÄêÀ´ËµµÄÌì
select date_add(curdate(),interval 1 year);
interval(¼ä¸ôµÄÒâ˼) date_add ʱ¼äÏà¼ÓµÄº¯Êý
interval Êý×Ö year»òÕßmonth
mod(month(curdate()),12)
modµÄÒâ˼ҲûÓÃÔõôÃ÷°×£¡ Òâ˼¾ÍÊÇÇ°Ò»¸öÖµÊÇ5,ºóÃæÖ¸¶¨Ç°ÃæµÄ²ÎÊý×î´óÊǶàÉÙ
now() µ±Ç°Ê±¼ä
user() µ±Ç°Óû§¼°Á´½ÓµØÖ·
\c ÖØпªÊ¼
select distinct name from test;
distinct È¥µôÖظ´×Ö¶Î
order by ÅÅÐò
binary(¶þ½øÖÆÒâ˼) Ç¿ÖÆÇø·Ö´óСд


Ïà¹ØÎĵµ£º

mysql ÐÞ¸ÄÃÜÂë

use mysql
update user set Password=password('newpassword') where User='root';
flush privileges;
Ê×ÏÈÒªÉùÃ÷Ò»µã£¬´ó²¿·ÖÇé¿öÏ£¬ÐÞ¸ÄMySQLÊÇÐèÒªÓÐmysqlÀïµÄrootȨÏ޵ģ¬
ËùÒÔÒ»°ãÓû§ÎÞ·¨¸ü¸ÄÃÜÂ룬³ý·ÇÇëÇó¹ÜÀíÔ±¡£
·½·¨Ò»
ʹÓÃphpmyadmin£¬ÕâÊÇ×î¼òµ¥µÄÁË£¬ÐÞ¸Ämysql¿âµ ......

ÔÙ̸mysqlµÄÅäÖÃÎļþmy.ini or my.cnf (Ö®Ò»)

ÈçÈôתÔر¾ÎÄ£¬Çë×¢Ã÷ԭʼ³ö´¦£ºhttp://hi.baidu.com/hexiong/blog/item/e860e5dd9b0d3ae376c6381a.html
(hexiong@baidu or iihero@CSDN)
ż¶ûÅöµ½ÓÐÈËÎÊʹÓÃmysqlÃüÁîÐУ¬ÀÏÈÃÈËÊäÈë--default-character-set=gbkÖ®ÀàÎÞÁĵÄÑ¡ÏÈÃÈË·³¡£ÈÃÈ˶àÊäÈëÁ˼¸¸ö×Ö·û£¬È·ÊµÓе㲻¶Ô¾¢¡£
¼ÓÉÏÓÐʱºò×Ô¼ºÓÐʱºòDIY£¬ºÜÉÙÔÚwindow ......

mysqlÃüÁ½õ

mysql
ÃüÁ½õ
²âÊÔ»·¾³£ºmysql 5.0.45
¡¾×¢£º¿ÉÒÔÔÚmysql
ÖÐͨ¹ýmysql>
SELECT VERSION();
À´²é¿´Êý¾Ý¿â°æ±¾¡¿

Ò»¡¢Á¬½ÓMYSQL
¡£

¸ñʽ£º mysql -h
Ö÷»úµØÖ· -u
̞
£­p
Óû§ÃÜÂë
1
¡¢Á¬½Óµ½±¾»úÉϵÄMYSQL
¡£

Ê×ÏÈ´ò¿ªDOS
´°¿Ú£¬È»ºó½øÈëĿ¼mysql\bin
£¬ÔÙ¼üÈëÃüÁîmysql -u r ......

mysql×Ö·û¼¯ÉèÖúͲéѯÎÊÌ⣨ת£©

mysql×Ö·û¼¯ÉèÖúͲéѯÎÊÌ⣨ת£©
2010-04-14 11:33
MySQLµÄ×Ö·û¼¯Ö§³Ö(Character Set Support)ÓÐÁ½¸ö·½Ã棺
     ×Ö·û¼¯(Character set)ºÍÅÅÐò·½Ê½(Collation)¡£
¶ÔÓÚ×Ö·û¼¯µÄÖ§³Öϸ»¯µ½Ëĸö²ã´Î:
     ·þÎñÆ÷(server)£¬Êý¾Ý¿â(database)£¬Êý¾Ý±í(table)ºÍÁ¬½Ó(connection) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ