LinuxÖв鿴ºÍÉèÖÃMySQLÊý¾Ý¿â×Ö·û¼¯(ת)
6
¡¢ÐÞ¸ÄÊý¾Ý¿âµÄ×Ö·û¼¯
mysql>use mydb
mysql>alter database mydb character set utf-8;
6
¡¢´´½¨Êý¾Ý¿âÖ¸¶¨Êý¾Ý¿âµÄ×Ö·û¼¯
mysql>create database mydb character set utf-8;
ͨ¹ýÅäÖÃÎļþÉèÖô´½¨Êý¾Ý¿âʱ×Ö·û¼¯:
#vi /var/lib/mysql/mydb/db.opt
default-character-set=latin1
default-collation=latin1_swedish_ci
Ϊdefault-character-set=utf8
default-collation=utf8_general_ci
ÖØÆðMySQL:
# /usr/share/mysql/mysqladmin –uroot –p shutdown
# /usr/share/mysql/bin/mysqld_safe &
7
¡¢Í¨¹ýMySQL
ÃüÁîÐÐÐÞ¸Ä:
mysql> set character_set_client=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_connection=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_database=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_results=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_server=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_system=utf8;
Query OK, 0 rows affected (0.01 sec)
mysql> set collation_connection=utf8;
Query OK, 0 rows affected (0.01 sec)
mysql> set collation_database=utf8;
Query OK, 0 rows affected (0.01 sec)
mysql> set collation_server=utf8;
Query OK, 0 rows affected (0.01 sec)
²é¿´:
mysql> show variables like 'character_set_%';
+--------------------------+----------------------------+
| Variable_name
| Value
|
+--------------------------+----------------------------+
| character_set_client &n
Ïà¹ØÎĵµ£º
1. ѧ»áд¼òµ¥µÄmakefile
2. ±àһЩӦÓÃ
³ÌÐò
£¬¿ÉÒÔÓÃmakefileÅÜÆðÀ´
3. ѧ»áдÇý¶¯
µÄmakefile
4. дһ¼òµ¥charÇý¶¯£¬makefile±àÒëͨ¹ý£¬¿ÉÒÔinsmod£¬ lsmod£¬ rmmod. ÔÚÇý¶¯µÄinitº¯ÊýÀï´òÓ¡hello world£¬insmodºóÓ¦¸ÃÄܹ»Í¨¹ýdmesg¿´µ½Êä³ö
¡£
5. дһÍêÕûÇý¶¯£¬ ¼ÓÉÏread£¬ write£¬ ioctl£¬ pollingµÈ¸ ......
shell ±à³ÌÖÐʹÓõ½µÃifÓï¾äÄÚÅжϲÎÊý
–b µ±file´æÔÚ²¢ÇÒÊÇ¿éÎļþʱ·µ»ØÕæ
-c µ±file´æÔÚ²¢ÇÒÊÇ×Ö·ûÎļþʱ·µ»ØÕæ
-d µ±pathname´æÔÚ²¢ÇÒÊÇÒ»¸öĿ¼ʱ·µ»ØÕæ
-e µ±pathnameÖ¸¶¨µÄÎļþ»òĿ¼´æÔÚʱ·µ»ØÕæ
-f µ±file´æÔÚ²¢ÇÒÊÇÕý¹æÎļþʱ·µ»ØÕæ
-g µ±ÓÉpathnameÖ¸¶¨µÄÎļþ»òĿ¼´æÔÚ²¢ÇÒÉèÖÃÁËSGIDλʱ·µ»ØÎ ......
ת×Ô£ºhttp://www.cnblogs.com/hopeworld/archive/2009/08/07/1541444.html
ͳ¼Æ×ÜÊý´óС
du -sh xmldb/
du -sm * | sort -n //ͳ¼Æµ±Ç°Ä¿Â¼´óС ²¢°²´óС ÅÅÐò
du -sk * | sort -n
du -sk * | grep guojf //¿´Ò»¸öÈ˵ĴóС
&nb ......
1¡¢linux gcc°üº¬µÄc/c++±àÒëÆ÷
¡¡¡¡gcc¡¢cc¡¢c++¡¢g++£º
¡¡¡¡gccºÍccÊÇÒ»ÑùµÄ£¬c++ºÍg++ÊÇÒ»ÑùµÄ£¬Ò»°ãc³ÌÐò¾ÍÓÃgcc±àÒ룬c++³ÌÐò¾ÍÓÃg++±àÒë
2¡¢linux gccµÄ»ù±¾Ó÷¨
¡¡¡¡gcc test.cÕâÑù½«±àÒë³öÒ»¸öÃûΪa.outµÄ³ÌÐògcc test.c -o testÕâÑù½«±àÒë³öÒ»¸öÃûΪtestµÄ³ÌÐò
¡¡¡¡-o²ÎÊýÓÃÀ´Ö¸¶¨Éú³É³ÌÐòµÄÃû×Ö
3¡¢Î ......