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

mysql ÐÞ¸ÄÃÜÂë

use mysql
update user set Password=password('newpassword') where User='root';
flush privileges;
Ê×ÏÈÒªÉùÃ÷Ò»µã£¬´ó²¿·ÖÇé¿öÏ£¬ÐÞ¸ÄMySQLÊÇÐèÒªÓÐ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¡£
·½·¨Æßuse mysql
update user set Password=password('newpassword') where User='root';
flush privileges;
×¢Ò⣺ PASSWORD() [²»ÊÇ]ÒÔÔÚUnix¿ÚÁî¼ÓÃܵÄͬÑù·½·¨Ê©ÐпÚÁî¼ÓÃÜ¡£


Ïà¹ØÎĵµ£º

ʵÏÖwin2003ÏÂmysqlÊý¾Ý¿âÿÌì×Ô¶¯±¸·Ý

ÖÕÓÚÈ÷þÎñÆ÷ÿÌìÔçÉϱ¸·ÝÒ»´Î MySQL Êý¾Ý¿â²¢×Ô¶¯´ò°ü,ͬʱɾ³ý 5 ÌìÇ°µÄ±¸·ÝÎļþ. ·ÖÏíÈçÏÂ.
1. »·¾³: windows server 2003 + Apache 2.0 + PHP5 + MySQL 4.0.26 .
2. ¼ÙÉè PHP °²×°Ä¿Â¼Îª D:/php ,MySQL °²×°Ä¿Â¼Îª D:/mysql.
3. ÔÚ D:/php Ͻ¨Á¢Ä¿Â¼ WinRAR, °ÑÄã winrar °²×°Ä¿Â¼Ï嵀 WinRAR.exe ºÍ RARReg.KEY ¸´ ......

mysql ´´½¨Óû§·½·¨

ÃüÁʽµÄ.×¢ÒâÿÐкó±ß¶¼¸ú¸ö £» ±íʾһ¸öÃüÁîÓï¾ä½áÊø.
¸ñʽ£ºgrant select on Êý¾Ý¿â.* to
Óû§Ãû@µÇ¼Ö÷»ú identified by "ÃÜÂë"
Àý1¡¢Ôö¼ÓÒ»¸öÓû§test1ÃÜÂëΪabc£¬ÈÃËû¿ÉÒÔÔÚÈκÎÖ÷»úÉϵǼ£¬²¢¶ÔËùÓÐÊý¾Ý¿âÓвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄȨÏÞ¡£Ê×ÏÈÓÃÒÔ
rootÓû§Á¬ÈëMYSQL
£¬
È»ºó¼üÈëÒÔÏÂÃüÁ
gr ......

»ù´¡ JAVA¶ÔMysql½øÐÐÁ¬½Ó¡¢²åÈë¡¢Ð޸ġ¢É¾³ý²Ù×÷

Êý¾Ý¿â±íµ¥µÄ´´½¨
mysql> create database shuishengmu;
Query OK, 1 row affected (0.00 sec)
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql    & ......

mysql text ³¤¶È


mysql text ³¤¶È
ÎÄÕ·ÖÀà:Êý¾Ý¿â
½ñÌìÔÚ×öDBÉè¼ÆµÄʱºòÔÚÏëÓÃTEXT ÊÇ·ñÄܹ»Âú×㽫À´µÄÊý¾Ý£¬Äܹ»³öÏÖ×°²»ÏµÄÇé¿ö¡£
ºóÀ´²éѯÁËһϹٷ½ÊÖ²áµÃµ½ÁËÒ»¸ö´ð°¸¡£
Ò»¸öBLOB»òTEXTÁУ¬×î´ó³¤¶ÈΪ65535(2^16-1)¸ö×Ö·û¡£
MEDIUMBLOB 
MEDIUMTEXT 
Ò»¸öBLOB»òTEXTÁУ¬×î´ó³¤¶ÈΪ16777215(2^24-1)¸ö×Ö·û¡£
LONG ......

MYSQLÖ÷¼ü×Ô¶¯Ôö¼ÓµÄÅäÖÃ

ÔÚÊý¾Ý¿âÓ¦Óã¬ÎÒÃǾ­³£ÒªÓõ½Î¨Ò»±àºÅ¡£ÔÚMySQLÖпÉͨ¹ý×ֶεÄAUTO_INCREMENTÊôÐÔÀ´×Ô¶¯Éú³É¡£MySQLÖ§³Ö¶àÖÖÊý¾Ý±í£¬Ã¿ÖÖÊý¾Ý±íµÄ×ÔÔöÊôÐÔ¶¼ÓÐËù²»Í¬¡£
ISAM±í
Èç¹û°ÑÒ»¸öNULL²åÈëµ½Ò»¸öAUTO_INCREMENTÊý¾ÝÁÐÀïÈ¥£¬MySQL½«×Ô¶¯Éú³ÉÏÂÒ»¸öÐòÁбàºÅ¡£±àºÅ´Ó1¿ªÊ¼£¬²¢1Ϊ»ùÊýµÝÔö¡£
µ±²åÈë¼Ç¼ʱ£¬Ã»ÓÐΪAUTO_INCREMENTÃ÷È ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ