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

ÈçºÎÐÞ¸Ämysql rootÃÜÂë

   Íü¼ÇMySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)
ROOTÃÜÂëÊÇÔÚMySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)ʹÓÃÖкܳ£¼ûµÄÎÊÌ⣬¿ÉÊÇÓкܶàÅóÓѲ¢²»»áÖØÖÃROOTÃÜÂ룬Äǽпడ£¬ÎÒÓÐÉîÓид¥£¬ÌØд´ËÎÄÕÂÓë´ó¼Ò½»Á÷£º
1¡¢±à¼­MySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)ÅäÖÃÎļþ£º
windows»·¾³ÖУº%MySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)_installdir%\my.ini¡¡//Ò»°ãÔÚMySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)°²×°Ä¿Â¼ÏÂÓÐmy.ini¼´MySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)µÄÅäÖÃÎļþ¡£
linux»·¾³ÖУº/etc/my.cnf
ÔÚ[MySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)d]ÅäÖöÎÌí¼ÓÈçÏÂÒ»ÐУº
skip-grant-tables
±£´æÍ˳ö±à¼­¡£
2¡¢È»ºóÖØÆôMySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)·þÎñ
windows»·¾³ÖУº
net stop MySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)
net start
MySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)
linux»·¾³ÖУº
/etc/init.d/MySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)d restart
3¡¢ÉèÖÃеÄROOTÃÜÂë
È»ºóÔÙÔÚÃüÁîÐÐÏÂÖ´ÐУº
MySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ) -uroot -p
MySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)
Ö±½Ó»Ø³µÎÞÐèÃÜÂë¼´¿É½øÈëÊý¾Ý¿âÁË¡£
ÏÖÔÚÎÒÃÇÖ´ÐÐÈçÏÂÓï¾ä°ÑrootÃÜÂë¸üÐÂΪ 123456£º
update user set password=PASSWORD("123456")
where user='root';
quit Í˳öMySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)¡£
4¡¢»¹Ô­ÅäÖÃÎļþ²¢ÖØÆô·þÎñ
È»ºóÐÞ¸ÄMySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)ÅäÖÃÎļþ°Ñ¸Õ²ÅÌí¼ÓµÄÄÇÒ»ÐÐɾ³ý¡£
ÔÙ´ÎÖØÆðMySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)·þÎñ£¬ÃÜÂëÐÞ¸ÄÍê±Ï¡£
ÐÞ¸ÄÍê±Ï¡£
ÓÃÐÂÃÜÂë123456ÊÔһϰɣ¬ÓÖÄܵÇÈëMySQL(ºÍPHP´îÅäÖ®×î¼Ñ×éºÏ)µÄ¸Ð¾õ¾ÍÊDz»Ò»Ñù°É£¿


Ïà¹ØÎĵµ£º

mysql Âý²éѯ·ÖÎö

轉×Ô»¨開µÄµØ·½
mysqlÓÐÒ»¸ö¹¦ÄܾÍÊÇ¿ÉÒÔlogÏÂÀ´ÔËÐеıȽÏÂýµÄsqlÓï¾ä£¬Ä¬ÈÏÊÇûÓÐÕâ¸ölogµÄ£¬ÎªÁË¿ªÆôÕâ¸ö¹¦ÄÜ£¬ÒªÐÞ¸Ämy.cnf»òÕßÔÚmysqlÆô¶¯
µÄʱºò¼ÓÈëһЩ²ÎÊý¡£
Èç¹ûÔÚmy.cnfÀïÃæÐ޸ģ¬ÐèÔö¼ÓÈçϼ¸ÐÐ
long_query_time = 1
log-slow-queries
=
log-queries-not-using-indexes
long_query_t ......

MySQLÐÐËøÉîÈëÑо¿

      ×öÏîĿʱÓÉÓÚÒµÎñÂß¼­µÄÐèÒª£¬±ØÐë¶ÔÊý¾Ý±íµÄÒ»Ðлò¶àÐмÓÈëÐÐËø£¬¾Ù¸ö×î¼òµ¥µÄÀý×Ó£¬Í¼Êé½èÔÄϵͳ¡£¼ÙÉè id=1 µÄÕâ±¾Êé¿â´æΪ 1 £¬µ«ÊÇÓÐ 2 ¸öÈËͬʱÀ´½èÕâ±¾Ê飬´Ë´¦µÄÂß¼­Îª :
Select restnum from book where id =1 ;
-- Èç¹û restnum ´óÓÚ 0 £¬Ö´ÐÐ update
Update boo ......

MysqlÖ»µ¼µ¥ÐеÄINSERTÓï¾ä


Ö»µ¼´´½¨±íµÄ½á¹¹£º
bin/mysqldump -d --add-drop-database=FALSE --add-drop-table=FALSE -usosodb -p sosodb TEST > /tmp/test.sql
Ö»µ¼µ¥ÐеÄINSERTÓï¾ä:
bin/mysqldump --extended-insert=FALSE --add-drop-database=FALSE --add-drop-table=FALSE --create-options=FALSE -t --add-locks=FALSE -usosodb -p so ......

asp.netÁ¬½ÓmysqlÊý¾Ý¿â

MysqlµÄconnector/net5.0ÏÂÔصØÖ·:
http://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-5.0.6.zip/from/pick
°²×°ºÃÒÔºó,
µãÊôÐÔ,È»ºóµã²éÕÒÄ¿±ê,µãÏòÉÏÒ»²ãĿ¼,ÕÒµ½Binaries\.NET 2.0,È»ºó½«Õâ¸öÎļþ¸´ÖƵ½ÄãµÄ¹¤³ÌĿ¼ÏÂ,Ò»°ãÕâÑùµÄDLLÎļþ»á±£´æµ½binĿ¼ÏÂ.
ÔÚ´úÂëÒ³ÀïÊäÈëusing Mysql.Da ......

mysql Âý²éѯ²éѯºÍÒýÆðÔ­Òò·ÖÎö

MySQLÓÐÒ»¸ö¹¦ÄܾÍÊÇ¿ÉÒÔlogÏÂÀ´ÔËÐеıȽÏÂýµÄsqlÓï¾ä£¬Ä¬ÈÏÊÇûÓÐÕâ¸ölogµÄ£¬ÎªÁË¿ªÆôÕâ¸ö¹¦ÄÜ£¬ÒªÐÞ¸Ämy.cnf»òÕßÔÚMySQLÆô¶¯µÄʱºò¼ÓÈëһЩ²ÎÊý¡£
Èç¹ûÔÚmy.cnfÀïÃæÐ޸ģ¬ÐèÔö¼ÓÈçϼ¸ÐÐ
long_query_time = 1
log-slow-queries =
log-queries-not-using-indexes
long_query_time ÊÇÖ¸Ö´Ðг¬¹ý¶à¾ÃµÄsql»á±»logÏÂÀ´£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ