ÈçºÎÐÞ¸ÄMySQL rootÃÜÂë
Íü¼ÇMySQL ROOTÃÜÂëÊÇÔÚMySQLʹÓÃÖкܳ£¼ûµÄÎÊÌ⣬¿ÉÊÇÓкܶàÅóÓѲ¢²»»áÖØÖÃROOTÃÜÂ룬Äǽпడ£¬ÎÒÓÐÉîÓид¥£¬ÌØд´ËÎÄÕÂÓë´ó¼Ò½»Á÷£º
1¡¢±à¼MySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)ÅäÖÃÎļþ£º
windows»·¾³ÖУº%MySQL_installdir%\my.ini
//Ò»°ãÔÚMySQL°²×°Ä¿Â¼ÏÂÓÐmy.ini¼´MySQLµÄÅäÖÃÎļþ¡£
linux»·¾³ÖУº/etc/my.cnf
ÔÚ[MySQLd]ÅäÖöÎÌí¼ÓÈçÏÂÒ»ÐУº
skip-grant-tables
±£´æÍ˳ö±à¼¡£
2¡¢È»ºóÖØÆôMySQL·þÎñ
windows»·¾³ÖУº
net stop MySQL
net start MySQL
linux»·¾³ÖУº
/etc/init.d/MySQLd restart
3¡¢ÉèÖÃеÄROOTÃÜÂë
È»ºóÔÙÔÚÃüÁîÐÐÏÂÖ´ÐУº
MySQL-uroot -p MySQL
Ö±½Ó»Ø³µÎÞÐèÃÜÂë¼´¿É½øÈëÊý¾Ý¿âÁË¡£
ÏÖÔÚÎÒÃÇÖ´ÐÐÈçÏÂÓï¾ä°ÑrootÃÜÂë¸üÐÂΪ7758521£º
update user set password=PASSWORD("7758521") where user='root';
quit Í˳öMySQL¡£
4¡¢»¹ÔÅäÖÃÎļþ²¢ÖØÆô·þÎñ
È»ºóÐÞ¸ÄMySQLÅäÖÃÎļþ°Ñ¸Õ²ÅÌí¼ÓµÄÄÇÒ»ÐÐɾ³ý¡£
ÔÙ´ÎÖØÆðMySQL·þÎñ£¬ÃÜÂëÐÞ¸ÄÍê±Ï¡£
ÓÃÐÂÃÜÂë7758521ÊÔһϰɣ¬ÓÖÄܵÇÈëMySQLµÄ¸Ð¾õ¾ÍÊDz»Ò»Ñù°É£¿
£¨±¾ÎÄÀ´Ô´ÓÚWEB¿ª·¢Íø£¬ÔÎÄÁ´½Ó£ºhttp://www.cncms.com.cn/mysql/5518.htm£©
Ïà¹ØÎĵµ£º
Èç¹ûÄãÊǸöÈü³µÊÖ²¢ÇÒ°´Ò»Ï°´Å¥¾ÍÄܹ»Á¢¼´¸ü»»ÒýÇæ¶ø²»ÐèÒª°Ñ³µ¿ªµ½³µ¿âÀïÈ¥»»£¬ÄÇ»áÊÇÔõô¸Ð¾õÄØ£¿MySQLÊý¾Ý¿âΪ¿ª·¢ÈËÔ±Ëù×öµÄ¾ÍºÃÏñÊÇ°´°´Å¥»»ÒýÇ棻ËüÈÃÄãÑ¡ÔñÊý¾Ý¿âÒýÇ棬²¢¸øÄãÒ»Ìõ¼òµ¥µÄ;¾¶À´Çл»Ëü¡£
MySQL µÄ×Ô´øÒýÇæ¿Ï¶¨Êǹ»ÓÃÁË£¬µ«ÊÇÔÚÓÐЩÇé¿öÏ£¬ÆäËûµÄÒýÇæ¿ÉÄÜÒª±ÈÊÖÍ·ËùÓøüÊʺÏÍê³ÉÈÎÎñ¡£Èç¹ûÔ¸Ò ......
MSSQL:select Right(sys.fn_VarBinToHexStr(hashbytes('MD5', '123456')),32)
MSSQL16λ:select Right(sys.fn_VarBinToHexStr(hashbytes('MD5', '123456')),16)
MySQL:select md5('123456')
.NET:string ½á¹û×Ö·û´®=System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFil ......
1¡¢ÔÚmysql Êý¾Ý¿âÖУ¬“2009-09-15 00£º00£º00”ת»¯ÎªÁÐΪ³¤ÕûÐ͵ĺ¯Êý£º
select unix_timstamp("2009-09-15 00£º00£º00")*1000,
ÕâÀïҪעÒ⣬mysqlÊý¾Ý¿âÖеij¤ÕûÐÍ£¬±ÈjavaÖеij¤ÕûÐÍÉÙÁËÃëºóÃæµÄºÁÃëÊý£¬ËùÒÔÒª³ËÒÔ1000£¬ÕâÑùÖ»Óм¸ºÁÃëÖ®²î
2¡¢ÔÚmysqlÊý¾Ý¿âÖУ¬“1252999488000”£ ......
MysqlµÄÓα꾿¾¹ÔõôÓÖӳÈպɻ¨±ðÑùºì
Mysql´Ó5.0¿ªÊ¼Ö§³Ö´æ´¢¹ý³ÌºÍtrigger£¬¸øÎÒÃÇϲ»¶ÓÃmysqlµÄÅóÓÑÃǸüϲ»¶mysqlµÄÀíÓÉÁË£¬Óï·¨
ÉϺÍPL/SQLÓвî±ð£¬²»¹ý¸ã¹ý±à³ÌµÄÈ˶¼ÖªµÀ£¬Óï·¨²»ÊÇÎÊÌ⣬¹Ø¼üÊÇ˼Ï룬´óÖÂÁ˽âÓï·¨ºó£¬¾Í´Ó
±äÁ¿¶¨Ò壬ѻ·£¬Åжϣ¬Óα꣬Òì³£´¦ÀíÕâ¸ö¼¸¸ö·½ÃæÏêϸѧϰÁË¡£¹ØÓÚÓαêµÄÓ÷¨M ......