mysql dumpÊý¾Ý
´ÓAÖ÷»úµ¼ÈëÊý¾Ýµ½BÖ÷»ú
mysqldump -hA -uusername -ppassword db_name >dumpfile
mysql -hB -uusername -ppassword
mysql>create database db_name2;
mysql>use db_name2;
mysql>source dumpfile;
ÏÈÓÃdump°ÑAÖеÄÊý¾Ý¿âdb_nameµ¼Èëµ½Îļþdumpfile£¬È»ºóÔÚBÖ÷»úÉÏ£¬´´½¨Ò»¸öеÄÊý¾Ý¿âdb_name2£¬Ê¹ÓÃsourceÃüÁ°ÑÎļþµ¼Èëµ½¸ÃÊý¾Ý¿â¡£
Ïà¹ØÎĵµ£º
//µÃ·Ö¼ÆËãËÄÉáÎåÈë
SELECT ROUND((SUM(getfeng)/SUM(totalfeng))*100) as feng from answerdata WHERE uid='151' AND targetid IS NOT NULL
1.ceil £¨£© /ceiling£¨£© ÏòÉÏÈ¡Õû
Àý£º ceil£¨1.2£© = 2
2.floor £¨£© ÏòÏÂÈ¡Õû
Àý£º floor£¨1.2£© = 1
3.round£¨£© ËÄÉáÎåÈë
&n ......
Ç×°®µÄÕü¾ÈMySQLµÄÖйúÇ©ÃûÖ§³ÖÕß:
Å·ÃË¿ÉÄÜÎÞ·¨Õü¾ÈMySQL, ÖйúºÍ¶íÂÞ˹¿ÉÄÜÊÇÕü¾ÈMySQLµÄÏ£ÍûÖ®ËùÔÚ¡£ÖйúÓµÓÐÇ¿´ó¡¢¶ÀÁ¢ÒÔ¼°×ÔÐŵķ´Â¢¶ÏÖ÷¹Ü»ú¹Ø£¬Òò´Ë£¬ÎÒ±¾ÈËÔÚ´ËÇëÇóÄúµÄ°ïÖú¡£¶ÔÓÚÄúÔÚ http://helpmysql.org/cn/petition
µÄÇ©Ãû£¬ÎÒÃÇÉî±í¸Ðл¡£Èç¹û¿ÉÒԵϰ£¬ÎÒÃÇÐèÒªÄúµÄ½øÒ»²½°ïÖú£º
&nb ......
1.ÐÞ¸ÄmysqlµÄĬÈϱàÂëΪgbk£ºÐÞ¸Ämy.initÎļþÖеģº[client]ºÍ[mysqld]ϵÄdefault-character-set=gbk£»
2.²é¿´mysqlÊý¾Ý¿âµÄ±àÂ룺show variable like 'character%';»òstatus
3.²é¿´Êý¾Ý¿â±íµÄ±àÂ룺show create table ±íÃû£»
4.ÐÞ¸ÄÊý¾Ý¿âµÄ±àÂ룺ALTER DATABASE `database_name` DEFAULT CHARACTER SET gbk COLLATE ......
ʹÓÃant¹¤¾ß±àÒë³ÌÐò£¬ÔËÐгÌÐò.ÃüÁî:ant -f xxx.xmlÖ¸¶¨Éú³ÉÎļþ£»ant run±àÒë²¢ÔËÐÐÎļþ¡£
Èç¹ûHibernate½«ÖÐÎIJåÈëmysqlÊý¾Ý¿â£¬µ÷ÓÃselectÓï¾äÖÐÎÄÏÔʾÂÒÂ룬ÔòmysqlµÄ±àÂ뷽ʽÉèΪgbk£¬×¢ÒâÕâÀïÊÇСд£¬²»ÓÃÖØÐ°²×°mysqlÊý¾Ý¿â£¬½«MySQL Server 5.1Ŀ¼ÏµÄmy.iniÅäÖÃÎļþÀïµÄËùÓÐdefault-character-setÉèΪgbk£¬× ......
mysql> show variables like "autocommit";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| autocommit | ON |
+---------------+-------+
1 row in set (0.00 sec)
mysql>
ÉèÖÃÍêÖ®ºó¿´¿´¸ÃÖµ
ÄãÒª¿ªÆôÒ»¸öÊÂÎñ£¬Ö±½Ó·¢ËÍbegin ¡£¡£¡£¡£commit¾Í¿ÉÒÔ£¬ºÎ±ØÒªÈ¥ ......