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

¼¸ÖÖÆƽâmysql rootÃÜÂëµÄ·½·¨

·½·¨Ò»
ʹÓÃphpmyadmin£¬ÕâÊÇ×î¼òµ¥µÄÁË£¬ÐÞ¸Ämysql¿âµÄuser±í£¬²»¹ý±ðÍüÁËʹÓÃPASSWORDº¯Êý¡£
·½·¨¶þ
ʹÓÃmysqladmin£¬ÕâÊÇÇ°ÃæÉùÃ÷µÄÒ»¸öÌØÀý¡£
mysqladmin -u root -p password mypasswd
ÊäÈëÕâ¸öÃüÁîºó£¬ÐèÒªÊäÈërootµÄÔ­ÃÜÂ룬ȻºórootµÄÃÜÂ뽫¸ÄΪmypasswd¡£
°ÑÃüÁîÀïµÄroot¸ÄΪÄãµÄÓû§Ãû£¬Äã¾Í¿ÉÒÔ¸ÄÄã×Ô¼ºµÄÃÜÂëÁË¡£
µ±È»Èç¹ûÄãµÄmysqladminÁ¬½Ó²»ÉÏmysql server£¬»òÕßÄãûÓа취ִÐÐmysqladmin£¬ÄÇôÕâÖÖ·½·¨¾ÍÊÇÎÞЧµÄ£¬¶øÇÒmysqladminÎÞ·¨°ÑÃÜÂëÇå¿Õ¡£
ÏÂÃæµÄ·½·¨¶¼ÔÚmysqlÌáʾ·ûÏÂʹÓã¬ÇÒ±ØÐëÓÐmysqlµÄrootȨÏÞ£º
·½·¨Èý
mysql> Insert INTO mysql.user (Host,User,Password)
VALUES(’%’,’jeffrey’,PASSWORD(’biscuit’));
mysql> FLUSH PRIVILEGES
È·ÇеØ˵ÕâÊÇÔÚÔö¼ÓÒ»¸öÓû§£¬Óû§ÃûΪjeffrey£¬ÃÜÂëΪbiscuit¡£
ÔÚ¡¶mysqlÖÐÎIJο¼ÊֲᡷÀïÓÐÕâ¸öÀý×Ó£¬ËùÒÔÎÒÒ²¾Íд³öÀ´ÁË¡£
×¢ÒâҪʹÓÃPASSWORDº¯Êý£¬È»ºó»¹ÒªÊ¹ÓÃFLUSH PRIVILEGES¡£
·½·¨ËÄ
ºÍ·½·¨ÈýÒ»Ñù£¬Ö»ÊÇʹÓÃÁËREPLACEÓï¾ä
mysql> REPLACE INTO mysql.user (Host,User,Password)
VALUES(’%’,’jeffrey’,PASSWORD(’biscuit’));
mysql> FLUSH PRIVILEGES
·½·¨Îå
ʹÓÃSET PASSWORDÓï¾ä£¬
mysql> SET PASSWORD FOR jeffrey@"%" = PASSWORD(’biscuit’);
ÄâÒ²±ØÐëʹÓÃPASSWORD()º¯Êý£¬µ«ÊDz»ÐèҪʹÓÃFLUSH PRIVILEGES¡£
·½·¨Áù
ʹÓÃGRANT ... IDENTIFIED BYÓï¾ä
mysql> GRANT USAGE ON *.* TO jeffrey@"%" IDENTIFIED BY ’biscuit’;
ÕâÀïPASSWORD()º¯ÊýÊDz»±ØÒªµÄ£¬Ò²²»ÐèҪʹÓÃFLUSH PRIVILEGES¡£
×¢Ò⣺ PASSWORD() [²»ÊÇ]ÒÔÔÚUnix¿ÚÁî¼ÓÃܵÄͬÑù·½·¨Ê©ÐпÚÁî¼ÓÃÜ¡£
MySQL Íü¼Ç¿ÚÁîµÄ½â¾ö°ì·¨
Èç¹û MySQL ÕýÔÚÔËÐУ¬Ê×ÏÈɱ֮£º killall -TERM mysqld¡£
Æô¶¯ MySQL £º/usr/bin/mysqld_safe --skip-grant-tables & --skip-grant-tables &
¾Í¿ÉÒÔ²»ÐèÒªÃÜÂë¾Í½øÈë MySQL ÁË¡£
È»ºó¾ÍÊÇ
>use mysql
>update user set password=password("new_pass") where user="root";
>flush privileges;
ÖØÐÂɱ MySQL £¬ÓÃÕý³£·½·¨Æô¶¯ MySQL ¡£
mysqlÃÜÂëÇå¿Õ
Windows:
1.ÓÃϵͳ¹ÜÀíÔ±µÇ½ϵͳ¡£
2.Í£Ö¹MySQLµÄ·þÎñ¡£
3.½øÈëÃüÁî´°¿Ú£¬È»ºó½øÈëMySQLµÄ°²×°Ä¿Â¼£¬±ÈÈçÎ


Ïà¹ØÎĵµ£º

mysql Êý¾ÝÀàÐÍvarchar ×ÓжàÉÙ

  ×òÌìÉè¼ÆÊý¾Ý¿â±íµÄʱºò£¬ÒòΪʹÓÃvarchar²úÉúÁËÒìÒ飬½á¹ûÒ»²é·¢ÏÖÎÒÃÇÁ½¸öË­¶¼Ã»´í¡£
   MySQLÊý¾Ý¿âµÄvarcharÀàÐÍÔÚ4.1ÒÔϵİ汾ÖеÄ×î´ó³¤¶ÈÏÞÖÆΪ255£¬ÆäÊý¾Ý·¶Î§¿ÉÒÔÊÇ0~255»ò1~255£¨¸ù¾Ý²»Í¬°æ±¾Êý¾Ý¿âÀ´
¶¨£©¡£
  
ÔÚMySQL5.0ÒÔÉϵİ汾ÖУ¬varcharÊý¾ÝÀàÐ͵ij¤¶ÈÖ§³Öµ½ÁË65535£¬Ò ......

Óà OPTIMIZE TABLE ÓÅ»¯ mysql ±í


Óà OPTIMIZE TABLE ÓÅ»¯ mysql ±í
ʱ¼ä:2010-2-28À´Ô´:HaCMS¿ªÔ´ÉçÇø ×÷Õß:gangzhong
REPAIR TABLE `table_name` ÐÞ¸´±í OPTIMIZE TABLE `table_name` ÓÅ»¯±í myisamchk table.MYI ÐÞ¸´Ë÷Òý REPAIR TABLE ÓÃÓÚÐÞ¸´±»ÆÆ»µµÄ±í¡£ myisamchk TABLE.MYI ÓÃÓÚÐÞ¸´±»ÆÆ»µµÄË÷ÒýÎļþ¡£ OPTIMIZE TABLE ÓÃÓÚ»ØÊÕÏÐÖõÄÊý¾Ý ......

Á˽âÊý¾Ý´æ´¢mysql¶Ô²âÊÔµÄÖúÒæ

¹ýÈ¥µÄÒ»¸öÔ£¬ÎҵŤ×÷ÖØÐĶ¼ÔںϷþÄ£¿éµÄ²âÊÔ¡£ÆÄÓÐһЩÊÕ»ñ¡£
´Ë´Î´óÁ¿ºÍmysql´ò½»µÀ£¬¶Ô²úÆ·µÄÊý¾Ý´æ´¢ÓÐÁ˱ȽÏÈ«ÃæµÄÕÆÎÕ¡£²¢´ÙʹºÍÖ´ÐÐÁËdbµÄ±í½á¹¹ºÍÊôÐԵļì²é¡£ºÏ·þͶ·Åºó£¬ÔÝδ·¢ÏÖÒò´íÎóÊý¾Ýµ¼ÖµÄbug»òʹʡ£
²¢ÔÚ²âÊÔ³õÆھ͹Ø×¢ºÍ¼ì²âÐÔÄÜÖ¸±ê£¬´Ùʹ³ÌÐò×öÁËÒ»´ÎÐÔÄܲâÊÔ£»¶ÔͶ·ÅʱµÄ·çÏÕÔöÇ¿ÁËÔ¤·ÀºÍ¿ØÖÆ¡£ ......

pythonÁ´½Ómysql³£¼ûÎÊÌâ

PythonÓëMysql
Ò»¡¢°²×°MySQLdbÄ£¿é
ʹÓÃpythonÁ¬½ÓMysqlµÄÇ°Ìᣬ¾ÍÊÇÐèÒªÒ»¸öÈÃpythonÁ¬½Óµ½MysqlµÄ½Ó¿Ú£¬Õâ¾ÍÊÇMySQLdbÄ£¿é¡£
ÑéÖ¤ÊÇ·ñÒѾ­°²×°ÁËMySQLdb£º
==========================================================
d:\usr\local\Python25>python
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v ......

MySQLÖÐÐÞ¸ÄÃÜÂë¼°·ÃÎÊÏÞÖÆÉèÖÃÏê½â

¡¡MySQLÊÇÒ»¸öÕæÕýµÄ¶àÓû§¡¢¶àÏß³ÌSQLÊý¾Ý¿â·þÎñÆ÷¡£MySQLÊÇÒÔÒ»¸ö¿Í»§»ú/·þÎñÆ÷½á¹¹µÄʵÏÖ£¬ËüÓÉÒ»¸ö·þÎñÆ÷ÊØ»¤³ÌÐòmysqldºÍºÜ¶à²»Í¬µÄ¿Í»§³ÌÐòºÍ¿â×é³É¡£ÓÉÓÚÆäÔ´ÂëµÄ¿ª·ÅÐÔ¼°Îȶ¨ÐÔ£¬ÇÒÓëÍøÕ¾Á÷ÐÐ±à »ÓïÑ PHPµÄÍêÃÀ½áºÏ£¬ÏÖÔںܶàÕ¾µã¶¼ÀûÓÃÆäµ±×÷ºó¶ËÊý¾Ý¿â£¬Ê¹Æä»ñµÃÁ˹㷺ӦÓᣴ¦ÓÚ°²È«·½ÃæµÄ¿¼ÂÇ£¬ÐèҪΪÿһÓû§¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ