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

ÐÞ¸ÄmysqlµÄrootÃÜÂëµÄ¼¸ÖÖ·½·¨

http://www.xiaojb.com/archives/it/mysqlroot.shtml
Method 1:
ÔÚ/usr/local/mysql/bin/Ï£º
./mysqladmin -u root password ‘new_password’
Ò»°ã°²×°Ê±Óô˷½·¨ÉèÖá£
Method 2:
ÔÚmysql״̬Ï£º
mysql>UPDATE user SET password=PASSWORD(’new_password’) WHERE user=’root’;
mysql>FLUSH PRIVILEGES;
Method 3:
mysql>SET PASSWORD FOR root=PASSWORD(’new_password’);
Ôö¼ÓÒ»¸ö²»ÖªµÀrootÃÜÂëÇé¿öÏÂÐÞ¸ÄrootÃÜÂë
mysqldÆô¶¯µÄʱºò¼ÓÉÏ–skip-grant-tables£¬È»ºóÂíÉÏÐÞ¸ÄÃÜÂ룬Ð޸ĺóÈ¥µô–skip-grant-tables£¬È»ºó¾ÍOKÁË¡£


Ïà¹ØÎĵµ£º

MySQLµÄfrom_UNIXTIME()ºÍUNIX_TIMESTAMP()º¯ÊýµÄÇø±ð

from_unixtime()ÊÇMySQLÀïµÄʱ¼äº¯Êý
dateΪÐèÒª´¦ÀíµÄ²ÎÊý(¸Ã²ÎÊýÊÇUnix ʱ¼ä´Á),¿ÉÒÔÊÇ×Ö¶ÎÃû,Ò²¿ÉÒÔÖ±½ÓÊÇUnix ʱ¼ä´Á×Ö·û´®
ºóÃæµÄ '%Y%m%d' Ö÷ÒªÊǽ«·µ»ØÖµ¸ñʽ»¯
ÀýÈç:
mysql>SELECT from_UNIXTIME( 1249488000, '%Y%m%d' )  
->20071120
mysql>SELECT from_UNIXTIME( 1249488000, '%YÄê%mÔ ......

Mysql³£ÓÃÃüÁîÐдóÈ«

µÚÒ»ÕС¢mysql·þÎñµÄÆô¶¯ºÍÍ£Ö¹
net stop mysql
net start mysql
µÚ¶þÕС¢µÇ½mysql
Óï·¨ÈçÏ£º mysql -uÓû§Ãû -pÓû§ÃÜÂë
¼üÈëÃüÁîmysql -uroot -p£¬ »Ø³µºóÌáʾÄãÊäÈëÃÜÂ룬ÊäÈë12345£¬È»ºó»Ø³µ¼´¿É½øÈëµ½mysqlÖÐÁË£¬mysqlµÄÌáʾ·ûÊÇ£º
mysql>
×¢Ò⣬Èç¹ûÊÇÁ¬½Óµ½ÁíÍâµÄ»úÆ÷ÉÏ£¬ÔòÐèÒª¼ÓÈëÒ»¸ö²ÎÊý-h»úÆ÷IP
µ ......

15.2.6.5. InnoDBºÍMySQL¸´ÖÆ


15.2.6.5. InnoDBºÍMySQL¸´ÖÆ
MySQL¸´ÖƾÍÏñ¶ÔMyISAM±íÒ»Ñù£¬Ò²¶ÔInnoDB±íÆð×÷Óá£ÒÔijÖÖ·½Ê½Ê¹Óø´ÖÆÒ²ÊÇ¿ÉÄܵģ¬ÔÚÕâÖÖ·½Ê½ÖдӷþÎñÆ÷ÉϱíµÄÀàÐͲ»Í¬ÓÚÖ÷·þÎñÆ÷ÉÏԭʼ±íµÄÀàÐÍ¡£ÀýÈ磬Äã¿ÉÒÔ¸´ÖÆÐ޸ĵ½Ö÷·þÎñÆ÷ÉÏÒ»¸öInnoDB±í£¬µ½´Ó·þÎñÆ÷ÉÏÒ»¸öMyISAM±íÀï¡£
ҪΪһ¸öÖ÷·þÎñÆ÷½¨Á¢Ò»¸öзþÎñÆ÷£¬Äã²»µÃ²»¸´ÖÆIn ......

mysql ÓÃͬһ±íÖеÄÁíÒ»ÐмǼµÄ×ֶθ³Öµ

CREATE TABLE `user` (
  `db_id` varchar(255) NOT NULL,
  `name` varchar(45) default NULL,
  `age` int(10) unsigned NOT NULL,
  `address` varchar(45) default NULL,
  PRIMARY KEY  (`db_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
// ÉèÖÃname='888'µÄageµÈÓÚname='111' ......

ÅúÁ¿Ìø¹ýmysql slave´íÎóС½Å±¾

[perl] ÅúÁ¿Ìø¹ýmysql slave´íÎóС½Å±¾
2009Äê02ÔÂ20ÈÕ 16:24
·¢ÏÖmysql slave·þÎñÆ÷¾­³£ÒòÎªÒ»Ð©ÌØÊâ×Ö·û»òÕß·ûºÅ²úÉúµÄ¸üÐÂÓï¾ä±¨´í£¬Õû¸öͬ²½Ò²»áÒò´Ë¶ø¿¨ÔÚÄÇ£¬×î³õµÄ°ì·¨Ö»ÊÇÊÖ¶¯È¥³ö´íµÄ»úÆ÷£¬Ö´ÐÐÏÂÃæÈýÌõsqlÓï¾ä£¬Ìø¹ý´íÎó¼´¿É¡£
slave stop;
set GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
slave start;
һ̨slave»ú ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ