mysql Ô´Âë±àÒë°²×°
»·¾³ rhel5.4
×°ºÃgcc ºÍÏàÓ¦µÄ¿â¡£ÎÒÕâ±ßÓöµ½curses¡£DebianϵͳµÄ»°Ðè°²×°apt-get install libncurses5-dev¡£
ÏÂÔØmysqlÔ´Âë°ü£¬ÎÒ×Ô¼ºÔÚmyslq¹Ù·½ÍøÕ¾ÉÏÏÂÁËÒ»¸ö“mysql-5.0.87.tar.gz”
cd /usr/local/src/
½â°ü tar zxvf mysql-5.0.87.tar.gz
cd mysql-5.0.87
./configure --prefix=/usr/local/service/mysql --bindir=/usr/local/service/bin --sbindir=/usr/local/service/sbin --sysconfdir=/usr/local/service/etc --localstatedir=/usr/local/service/mysql/data --with-mysqld-user=mysql --with-charset=utf8 --with-extra-charsets=gbk,gb2312,utf8 --with-collation=utf8_general_ci --without-debug --with-unix-socket-path=/tmp/mysql.sock --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-big-tables --enable-thread-safe-client --enable-assembler
--prefix=/usr/local/service/mysql Ö¸¶¨mysql°²×°Â·¾¶
--bindir=/usr/local/service/bin Ö¸¶¨mysqlÖ´ÐÐÎļþ°²×°Â·¾¶
--localstatedir=/usr/local/service/mysql/data Ö¸¶¨mysqlÊý¾ÝÎļþ´æ·Å·¾¶
--with-mysqld-user=mysql Ö¸¶¨mysqlÓû§
--with-charset=utf8 &nbs
Ïà¹ØÎĵµ£º
´úÂëÈçÏ£º
1 String command = " cmd /c C:/Program Files/MySQL/MySQL Server 5.0/bin>mysqldump -h localhost -u root -p aijia > E:/aijia.dmp " ;
2 try {
3 Process process& ......
²éѯһÌ죺
select * from table where to_days(column_time) = to_days(now());
select * from table where date(column_time) = curdate();
²éѯһÖÜ£º
select * from table where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(column_time);
²éѯһ¸öÔ£º
select * from table where DATE_SUB(CUR ......
ÈÕÆÚº¯Êý£º
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html
http://hi.baidu.com/yase_guoguo/blog/item/171c2d4feea83c01b2de0527.html
SQL ʱ¼ä±È½Ï
select * from useroperation where '2009-10-26 00:00:00' < date; //dateµÄÀàÐÍÊÇdatetime
select * from useroperation where D ......
MySQL FOR LINUX
Ïȼì²éϵͳÊÇ·ñ×°ÉÏÁËmysql£¬Èç¹ûÓн«ÆäÐ¶ÔØµô
rpm -qa | grep mysql
×¢ÒâmysqlµÄ´óСд£¬´óСд¶¼ÓпÉÄÜ
rpm -e --nodeps mysql*
Ò»¶¨ÒªÓÃ--nodepsÐ¶ÔØ£¬²»¼ì²éÒÀÀµÐÔ¹ØÏµ¡£
´´½¨Óû§mysql
groupadd mysql
useradd -g mysql mysql
passwd mysql
ÔÚ/usr/localϽ¨Á¢ mysql Îļþ¼Ð
È»ºó½«°²×°Î ......
ͨ¹ýÎļþÃû²éÕÒ·¨£º
Õâ¸ö·½·¨ËµÆðÀ´¾ÍºÍÔÚWINDOWSϲéÕÒÎļþÒ»ÑùÈÝÒ×Àí½âÁË¡£Èç¹ûÄã°ÑÕâ¸öÎļþ·ÅÔÚµ¥¸öµÄÎļþ¼Ð
ÀïÃæ£¬Ö»ÒªÊ¹Óó£¼ûµÄ“ls"ÃüÁî¾ÍÄÜ·½±ãµÄ²éÕÒ³öÀ´£¬ÄÇôʹÓÓfind”ÃüÁîÀ´²éÕÒËü¾Í²»Äܸø
ÄãÁôÏÂÉî¿ÌµÄÓ¡Ï󣬱Ͼ¹“find”ÃüÁîµÄÇ¿´ó¹¦Äܲ»Ö¹Õâ¸ö¡£Èç¹ûÖªµÀÁËij¸öÎļþµÄÎÄ ......