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

ÈçºÎÐÞ¸ÄMYSQLÊý¾Ý¿âÃÜÂë


Ê×ÏÈÒªÉùÃ÷Ò»µã£¬´ó²¿·ÖÇé¿öÏ£¬ÐÞ¸Ä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¡£
×¢Ò⣺ PASSWORD() [²»ÊÇ]ÒÔÔÚUnix¿ÚÁî¼ÓÃܵÄͬÑù·½·¨Ê©ÐпÚÁî¼ÓÃÜ¡£
MySQL Íü¼Ç¿ÚÁîµÄ½â¾ö°ì·¨
Èç¹û MySQL ÕýÔÚÔËÐУ¬Ê×ÏÈɱ֮£º killall -TERM mysqld¡£
Æô¶¯ MySQL £ºbin/safe_mysqld --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 ûÓÐdataĿ¼µÄ½â¾ö·½°¸

¿ÉÒԲ鿴mysqlÎļþĿ¼my.iniÎļþ£¬¿ÉÒÔÕÒµ½ÀàËÆÓÚ
datadir="D:/beeagle/Program Files/MySQL/MySQL Server 5.0/Data/"µÄ×Ö¶Î
¸Ã·¾¶Îªmysql dataĿ¼
ĬÈÏÔÚ£º"C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\Data\"
×¢Ò⣺Application DataÎļþ¼ÐÊÇÒþ²ØµÄ£¡£¡£¡
¿ÉÒÔÐÞ¸ÄÉÏÊöÅäÖ㬠......

PHP + Apache + MySQL °²×°ÅäÖÃ

´ËÎÄյݲװ·½·¨ÊÊÓÃÓÚWindows XPϵÄApache+PHP+MySQL°²×°¡£ 1. °²×°»·¾³
²Ù×÷ϵͳÊÇ Windows XP ÖÐÎÄ°æ, Apache, PHP, MySQL µÄ×îа汾ÊǽØÖ¹µ½ 2007.09.07£¬·Ö±ðÔÚÆä¹ÙÍøÏÂÔصÄ:
* Apache 2.2.6£ºhttp://apache.mirror.phpchina.com/httpd/binaries/win32/
* PHP 5.2.4 (Windows Binaries PHP 5.2.4 z ......

PHPʹÓÃÊý¾Ý¿âÓÀ¾ÃÁ¬½Ó·½Ê½²Ù×÷MySQLµÄÊÇÓë·Ç

PHP³ÌÐòÔ±Ó¦¸Ã¶¼ÖªµÀÁ¬½ÓMySQLÊý¾Ý¿â¿ÉÒÔʹÓÃmysql_pconnect£¨ÓÀ¾ÃÁ¬½Ó£©º¯Êý£¬Ê¹ÓÃÊý¾Ý¿âÓÀ¾ÃÁ¬½Ó¿ÉÒÔÌá¸ßЧÂÊ£¬µ«ÊÇʵ¼ÊÓ¦ÓÃÖÐÊý¾Ý¿âÓÀ¾ÃÁ¬½ÓÍùÍù»áµ¼Ö³öÏÖһЩÎÊÌ⣬ͨ³£µÄ±íÏÖ¾ÍÊÇÔÚ´ó·ÃÎÊÁ¿µÄÍøÕ¾ÉÏʱ³£·¢Éú¶Ï¶ÏÐøÐøµÄÎÞ·¨Á¬½ÓÊý¾Ý¿âµÄÇé¿ö£¬³öÏÖÀàËÆ£¢Too many connections in ...£¢µÄ´íÎóÌáʾÐÅÏ¢£¬ÖØÐÂÆô¶¯·þÎñÆ÷Ó ......

Mysql²éѯʱ£¬¶ÔÓÚÊýÖµÐÍ×ֶμӵ¥ÒýºÅ»áÒýÆðµÄÎó½â¡«

¼ÙÉèÓбí tb1
ID £ü name£ü
----+--------+
1   £ü2toon£ü
2   £ü1*xyz£ü
Óï¾ä1£º
 select * from  tb1 where ID='2toon' or name ='2toon';
mysql·þÎñÆ÷ÔÚijģʽÏ£¬¿ÉÒÔÖ´ÐÐÕâÌõ¾ä£¬¾Í³É¹¦·µ»ØÁ½Ìõ¼Ç¼£¬Ô­ÒòÔÚÓÚ ID=‘2toon’ ¼ÓÁ˵¥ÒýºÅ£¬mysql½âÊÍΪ ID=2.
Óï¾ä2
select * fro ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ