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ÃüÁ°ÑÎļþµ¼Èëµ½¸ÃÊý¾Ý¿â¡£
Ïà¹ØÎĵµ£º
°²×°µÄOSΪSolaris10,mysql °æ±¾ÊÇ5.1.38
Ò»¡¢Ê¹ÓÃRPM°ü½øÐа²×°
Ê×ÏÈ¿ÉÒÔ´Ó°²×°¹âÅÌÖлòÕßµ½mysqlµÄÍøÕ¾ÉÏÏÂÔØ¶ÔÓ¦°æ±¾µÄrpm°üÈçÏ£º
MySQL-server-community-5.1.38-0.rhel5.i386.rpm
MySQL-client-community-5.1.38-0.rhel5.i386.rpm
½Ó×ÅÎÒÃÇ¿ÉÒÔʹÓÃrpmÃü ......
ÔÀí
QueryCache(ÏÂÃæ¼ò³ÆQC)ÊǸù¾ÝSQLÓï¾äÀ´cacheµÄ¡£Ò»¸öSQL²éѯÈç¹ûÒÔselect¿ªÍ·£¬ÄÇôMySQL·þÎñÆ÷½«³¢ÊÔ¶ÔÆäʹÓÃ
QC¡£Ã¿¸öCache¶¼ÊÇÒÔSQLÎı¾×÷ΪkeyÀ´´æµÄ¡£ÔÚÓ¦ÓÃQC֮ǰ£¬SQLÎı¾²»»á±»×÷Èκδ¦Àí¡£Ò²¾ÍÊÇ˵£¬Á½¸öSQLÓï¾ä£¬Ö»ÒªÏà²îÄÄÅÂÊÇÒ»¸ö×Ö·û£¨ÀýÈç´óСд²»Ò»Ñù£»¶àÒ»¸ö¿Õ¸ñµÈ£©£¬ÄÇôÕâÁ½¸öSQL½«Ê¹Óò»Í¬µÄÒ» ......
ÐÂÔöÓû§£º
GRANT ALL PRIVILEGES ON *.* TO 'root'@'ÄãµÄÔ¶¶Ëip' IDENTIFIED BY 'ÄãµÄÃÜÂë' WITH GRANT OPTION;
È磺
GRANT ALL PRIVILEGES ON *.* TO 'root'@'10.10.19.220' IDENTIFIED BY '123456' WITH GRANT OPTION;
µÇ¼µ½ÐÂÔöµÄÓû§£º£¨¼ÙÈçÔÊÚȨ»úµÄIPΪ10.10.19.222£©
mysql -uroot -p123456&n ......
ʹÓÃ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¾Í¿ÉÒÔ£¬ºÎ±ØÒªÈ¥ ......