Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Êý¾Ý¿âÓû§ÃÜÂëµÄÐÞ¸Ä

»·¾³£º
²Ù×÷ϵͳ£ºWIN2003
MySql£ºmysql  Ver 12.22 Distrib 4.0.18, for Win95/Win98 (i32)
 
˼Ï룺
ΪÁË°²È«¼ÓÃÜÐèÒªÉèÖÃmysqlÊý¾Ý¿âÏà¹ØÓû§µÄÃÜÂ룻
MySqlÊý¾Ý¿âµÄÃÜÂ붼ÊDZ£´æÔÚmysqlÊý¾Ý¿âʵÀýµÄuser±íÖеÄpassword×Ö¶ÎÀͨ¹ýPASSWORD("")µÄº¯Êý¶ÔÃÜÂë¼ÓÃܺ󱣴æÔÚ±íÖУ»
ËùÒÔÒªÐÞ¸ÄÓû§µÄÃÜÂëÖ ......

[MySQLÓÅ»¯] ÈçºÎ²éÕÒSQLЧÂʵØϵÄÔ­Òò


[MySQLÓÅ»¯] -- ÈçºÎ²éÕÒSQLЧÂʵØϵÄÔ­Òò
ʱ¼ä:2010-2-28À´Ô´:HaCMS¿ªÔ´ÉçÇø ×÷Õß:chusong
²éѯµ½Ð§ÂÊµÍµÄ SQL Óï¾ä ºó£¬¿ÉÒÔͨ¹ý EXPLAIN »òÕß DESC ÃüÁî»ñÈ¡ MySQL ÈçºÎÖ´ÐÐ SELECT Óï¾äµÄÐÅÏ¢£¬°üÀ¨ÔÚ SELECT Óï¾äÖ´Ðйý³ÌÖбíÈçºÎÁ¬½ÓºÍÁ¬½ÓµÄ˳Ðò£¬±ÈÈçÎÒÃÇÏë¼ÆËã 2006 ÄêËùÓй«Ë¾µÄÏúÊ۶ÐèÒª¹ØÁª sales ......

[MySQLÓÅ»¯] ÈçºÎ¶¨Î»Ð§Âʽϵ͵ÄSQL


[MySQLÓÅ»¯] -- ÈçºÎ¶¨Î»Ð§Âʽϵ͵ÄSQL
ʱ¼ä:2010-2-28À´Ô´:HaCMS¿ªÔ´ÉçÇø ×÷Õß:zhenpao
Ò»°ãͨ¹ýÒÔÏÂÁ½ÖÖ·½Ê½¶¨Î»Ö´ÐÐЧÂÊ½ÏµÍµÄ SQL Óï¾ä¡£ Âý²éѯÈÕÖ¾ÔÚ²éѯ½áÊøÒÔºó²Å¼Í¼£¬ËùÒÔÔÚÓ¦Ó÷´Ó³Ö´ÐÐЧÂʳöÏÖÎÊÌâµÄʱºò²éѯÂý²éѯÈÕÖ¾²¢²»Äܶ¨Î»ÎÊÌ⣬¿ÉÒÔʹÓà show processlist ÃüÁî²é¿´µ±Ç° MySQL ÔÚ½øÐеÄỊ̈߳¬° ......

Mysql ³£Óú¯Êý


 
Mysql ³£Óú¯Êý
ASCII(str) 
¡¡·µ»Ø×Ö·û´®strµÄµÚÒ»¸ö×Ö·ûµÄASCIIÖµ(strÊÇ¿Õ´®Ê±·µ»Ø0) 
mysql> select ASCII('2'); 
¡¡¡¡-> 50 
mysql> select ASCII(2); 
¡¡¡¡-> 50 
mysql> select ASCII('dete'); 
¡¡¡¡- ......

ÔÚ Cygwin ÖбàÒë MySQL ¿Í»§¶Ë

ת×Ôhttp://www.phpvim.net/windows/build-mysql-client-on-cygwin.html
MinTTY ÊÇÒ»¸öСÇɵ«È´ºÜʵÓÃµÄ Cygwin Öն˻ú£¬µ«ÓиöÑÏÖصÄÎÊÌâ¾ÍÊÇÎÞ·¨µ÷Óý»»¥Ð﵀ Windows Ô­Éú³ÌÐò£¬±ÈÈç˵
mysql.exe£¬µ±ÄãÔÚ MinTTY ÖÐÊäÈëÈçϵÄÃüÁ
1
$ mysql -uroot
-p
±¾À´ mysql.exe »áÌáʾÊäÈëÃÜÂ룬µ«ÔÚ MinTTY ÖгÌÐò»áÖ± ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ