Mysql ÃüÁîʵÀý
1. Mysql Åàѵ
1.1. ÅàѵĿµÄ
±¾ÎĵµÊÇÕë¶ÔMySQL Êý¾Ý¿â·½ÃæµÄ»ù´¡Åàѵ£¬ÎªÁËʹÏîÄ¿×é³ÉÔ±Äܹ»´ïµ½Ê¹ÓÃMySQL Êý¾Ý¿âµÄÄ¿µÄ¡£
1.2. Åàѵ¶ÔÏó
¿ª·¢ÈËÔ±
1.3. ³£Óôʼ°·ûºÅ˵Ã÷
³£Óôʣº
Mysql£ºÒ»ÖÖÃâ·ÑµÄ¿çƽ̨µÄÊý¾Ý¿âϵͳ
E:\mysql£º±íʾÊÇÔÚdos ÃüÁî´°¿ÚÏÂÃæ
mysql> ±íʾÊÇÔÚmysql µÄÃüÁîÐÐÏÂ
1.4. ²Î¿¼ÐÅÏ¢
http://dev.mysql.com/doc/refman/5.0/en/index.html
2. MYSQL
2.1. Á¬½ÓMYSQL
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû -pÓû§ÃÜÂë
Á¬½ÓÔ¶³Ì»úÆ÷£º
E:\mysql>mysql -h10.4.3.188 -uptsdb -p
µÈ¼Ûд·¨
E:\mysql>mysql --host=10.4.3.188 --user=ptsdb --password
Á¬½Ó±¾µØ»úÆ÷£º
E:\mysql>mysql -uroot -p
µÈ¼Ûд·¨
E:\mysql>mysql --user=root -password
£¨×¢:uÓëroot¿ÉÒÔ²»Óüӿոñ£¬ÆäËüÒ²Ò»Ñù£©
×¢ÒâÊÂÏ»·¾³±äÁ¿path ÀïÃæÒªÉ趨mysqlµÄbinµÄ·¾¶£º
C:\Program Files\MySQL\MySQL Server 5.0\bin
2.2. ÐÞ¸ÄÃÜÂë
·½·¨Ò»£ºÊ¹ÓÃmysqladmin
¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
Àý1£ºE:\mysql>mysqladmin -uroot password root
×¢£ºÒòΪ¿ªÊ¼Ê±rootûÓÐÃÜÂ룬ËùÒÔ-p¾ÉÃÜÂëÒ»Ïî¾Í¿ÉÒÔÊ¡ÂÔÁË¡£
Àý2£ºÔÙ½«rootµÄÃÜÂë¸ÄΪroot123¡£
E:\mysql>mysqladmin -uroot -proot password root123
·½·¨¶þ£ºÖ±½Ó¸üРuser ±í
mysql>UPDATE user SET password=PASSWORD("test123") WHERE user='test';
mysql> FLUSH PRIVILEGES;
mysql> SET PASSWORD FOR test=PASSWORD('test123');
mysql> FLUSH PRIVILEGES;
·½·¨Èý£ºÊ¹Óà grant
¸ñʽ£ºgrant ȨÏÞ on Êý¾Ý¿â.±í¸ñ| ÆäËû to Óû§@Ö÷»ú IDENTIFIED BY ¿ÚÁî
Àý1£º¸øtestÓû§ÔÚ±¾µØlocalhost ËùÓÐȨÏÞ(³ýÁËGRANT OPTION)£¬¿ÚÁîΪ test
(Ï൱ÓÚÐÞ¸ÄÁËtest Óû§µÄ¿ÚÁî)
mysql>grant all on *.* to test@localhost identified by "test";
µÈͬÓÚ
mysql>grant all on *.* to test @localhost identified by PASSWORD " *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 ";
Àý2¡¢Ôö¼ÓÒ»¸öÓû§testÃÜÂëΪabc£¬ÈÃËû¿ÉÒÔÔÚÈκÎÖ÷»úÉϵǼ£¬²¢¶ÔtestÊý¾Ý¿âÓвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄȨÏÞ¡£Ê×ÏÈÓÃÒÔrootÓû§Á¬ÈëMYSQL£¬È»ºó¼üÈëÒÔÏÂÃüÁ
mysql>grant select,insert,update,delete on test.* to test@"%" Identified by "abc";
ÔÚmysql.user ±íÖУ¬ÓÐÁ½¸ötest Óû§
Ò
Ïà¹ØÎĵµ£º
mysql°²×°Í¼½â½Ì³Ì 5.1
2009Äê03ÔÂ01ÈÕ ÐÇÆÚÈÕ 23:51
תÔØÇë×¢Ã÷³ö´¦:http://hi.baidu.com/herdff/blog/item/6e6b4bcf6132f90b93457e14.html
±¾½Ì³ÌÒÔMysql 5.1°æ±¾ÎªÀý£¬¸ü¸ß°æ±¾°²×°¹ý³ÌÓë´ËÀàËÆ¡£ÔĶÁÇ°£¬ÇëÏÂÔØ5.1£¬ÏÂÔصØÖ·£ºwww.mysql.com
°²×°¹ý³ÌÓëÆäËüWindows°²×°³ÌÐòÒ»Ñù£¬Ê×ÏȳöÏÖµÄÊÇ°²×°Ïòµ¼»¶Ó½çÃæ
Ö ......
MySQLÊÇÒ»¸ö·Ç³£Á÷ÐеÄСÐ͹ØϵÐÍÊý¾Ý¿â¹ÜÀíϵͳ£¬2008Äê1ÔÂ16ºÅ±»Sun¹«Ë¾ÊÕ¹º¡£Ä¿Ç°MySQL±»¹ã·ºµØÓ¦ÓÃÔÚInternetÉϵÄÖÐСÐÍÍøÕ¾ÖС£ÓÉÓÚÆäÌå»ýС¡¢Ëٶȿ졢×ÜÌåÓµÓгɱ¾µÍ£¬ÓÈÆäÊÇ¿ª·ÅÔ´ÂëÕâÒ»Ìص㣬Ðí¶àÖÐСÐÍÍøվΪÁ˽µµÍÍøÕ¾×ÜÌåÓµÓгɱ¾¶øÑ¡ÔñÁËMySQL×÷ΪÍøÕ¾Êý¾Ý¿â¡£
1¡¢phpMyAdmin£¨http://www.phpmyadmin.net/£©
......
´óСдÃô¸ÐÐÔ
1¡¢Êý¾Ý¿âºÍ±íÃû
ÔÚMySQLÖУ¬Êý¾Ý¿âºÍ±í¶ÔÓ¦ÓÚÔÚÄÇЩĿ¼ÏµÄĿ¼ºÍÎļþ£¬Òò¶ø£¬ÄÚÔڵIJÙ×÷ϵͳµÄÃô¸ÐÐÔ¾ö¶¨Êý¾Ý¿âºÍ±íÃüÃûµÄ´óСдÃô¸ÐÐÔ¡£ÕâÒâζ×ÅÊý¾Ý¿âºÍ±íÃûÔÚUnixÉÏÊÇÇø·Ö´óСдµÄ£¬¶øÔÚWin32ÉϺöÂÔ´óСд¡£
×¢Ò⣺ÔÚWin32ÉÏ£¬¾¡¹ÜÊý¾Ý¿âºÍ±íÃûÊǺöÂÔ´óСдµÄ£¬Äã²»Ó¦¸ÃÔÚͬһ¸ö²éѯÖÐʹÓà ......
mysqlÖ´ÐÐsqlÓï¾äʱÓÐʱ»á³öÏÖCR_COMMANDS_OUT_OF_SYNC´íÎó£¨2014£©
ÌáʾÓïΪ
commands out of sync; you can't run this command now
ÍøÉ϶Դ˴íÎóµÄÃèÊöºÜÉÙ£¬¶øÇÒûÓиø³ö½â¾ö·½·¨¡£
ÆäʵÕâÊÇÒòΪÉÏÒ»¸ösqlÖ´Ðзµ»ØÁ˶à¸ö½á¹û¼¯£¬µ«Ã»Óаѽá¹û¶¼È¡³öÀ´£¬¾ÍÖ´ÐÐÁËеÄsqlÓï¾ä£¬¾Í»á²úÉúÕâ¸ö´íÎó¡£
Ó¦ÔÚsqlÓï¾äÖ´Ðкó ......