mysqlÃüÁî
²âÊÔ»·¾³£ºmysql 5.0.45
¡¾×¢£º¿ÉÒÔÔÚmysqlÖÐͨ¹ýmysql> SELECT VERSION();À´²é¿´Êý¾Ý¿â°æ±¾¡¿
ÕûÀí£ºleo
Ò»¡¢Á¬½ÓMYSQL¡£
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £pÓû§ÃÜÂë
1¡¢Á¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼mysql\bin£¬ÔÙ¼üÈëÃüÁîmysql -u root -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂë.×¢ÒâÓû§ÃûÇ°¿ÉÒÔÓпոñÒ²¿ÉÒÔûÓпոñ£¬µ«ÊÇÃÜÂëÇ°±ØÐëûÓпոñ£¬·ñÔòÈÃÄãÖØÐÂÊäÈëÃÜÂë.
Èç¹û¸Õ°²×°ºÃMYSQL£¬³¬¼¶Óû§rootÊÇûÓÐÃÜÂëµÄ£¬¹ÊÖ±½Ó»Ø³µ¼´¿É½øÈëµ½MYSQLÖÐÁË£¬MYSQLµÄÌáʾ·ûÊÇ£º mysql>
2¡¢Á¬½Óµ½Ô¶³ÌÖ÷»úÉϵÄMYSQL¡£¼ÙÉèÔ¶³ÌÖ÷»úµÄIPΪ£º110.110.110.110£¬Óû§ÃûΪroot,ÃÜÂëΪabcd123¡£Ôò¼üÈëÒÔÏÂÃüÁ
mysql -h110.110.110.110 -u root -p 123;£¨×¢:uÓërootÖ®¼ä¿ÉÒÔ²»Óüӿոñ£¬ÆäËüÒ²Ò»Ñù£©
3¡¢Í˳öMYSQLÃüÁ exit £¨»Ø³µ£©
¶þ¡¢ÐÞ¸ÄÃÜÂë¡£
¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
1¡¢¸øroot¼Ó¸öÃÜÂëab12¡£Ê×ÏÈÔÚDOSϽøÈëĿ¼mysql\bin£¬È»ºó¼üÈëÒÔÏÂÃüÁî
mysqladmin -u root -password ab12
×¢£ºÒòΪ¿ªÊ¼Ê±rootûÓÐÃÜÂ룬ËùÒÔ-p¾ÉÃÜÂëÒ»Ïî¾Í¿ÉÒÔÊ¡ÂÔÁË¡£
2¡¢ÔÙ½«rootµÄÃÜÂë¸ÄΪdjg345¡£
mysqladmin -u root -p ab12 password djg345
Èý¡¢Ôö¼ÓÐÂÓû§¡£
£¨×¢Ò⣺ºÍÉÏÃ治ͬ£¬ÏÂÃæµÄÒòΪÊÇMYSQL»·¾³ÖеÄÃüÁËùÒÔºóÃ涼´øÒ»¸ö·ÖºÅ×÷ΪÃüÁî½áÊø·û£©
¸ñʽ£ºgrant select on Êý¾Ý¿â.* to Óû§Ãû@µÇ¼Ö÷»ú identified by “ÃÜÂë”
1¡¢Ôö¼ÓÒ»¸öÓû§test1ÃÜÂëΪabc£¬ÈÃËû¿ÉÒÔÔÚÈκÎÖ÷»úÉϵǼ£¬²¢¶ÔËùÓÐÊý¾Ý¿âÓвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄȨÏÞ¡£Ê×ÏÈÓÃrootÓû§Á¬ÈëMYSQL£¬È»ºó¼üÈëÒÔÏÂÃüÁ
grant select,insert,update,delete on *.* to [email=test1@”%]test1@”%[/email]” Identified by “abc”;
µ«Ôö¼ÓµÄÓû§ÊÇÊ®·ÖΣÏյģ¬ÄãÏëÈçij¸öÈËÖªµÀtest1µÄÃÜÂ룬ÄÇôËû¾Í¿ÉÒÔÔÚinternetÉϵÄÈκÎһ̨µçÄÔÉϵǼÄãµÄmysqlÊý¾Ý¿â²¢¶ÔÄãµÄÊý¾Ý¿ÉÒÔΪËùÓûΪÁË£¬½â¾ö°ì·¨¼û2¡£
2¡¢Ôö¼ÓÒ»¸öÓû§test2ÃÜÂëΪabc,ÈÃËûÖ»¿ÉÒÔÔÚlocalhostÉϵǼ£¬²¢¿ÉÒÔ¶ÔÊý¾Ý¿âmydb½øÐвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄ²Ù×÷£¨localhostÖ¸±¾µØÖ÷»ú£¬¼´MYSQLÊý¾Ý¿âËùÔÚµÄÄÇ̨Ö÷»ú£©£¬
ÕâÑùÓû§¼´Ê¹ÓÃÖªµÀtest2µÄÃÜÂ룬ËûÒ²ÎÞ·¨´ÓinternetÉÏÖ±½Ó·ÃÎÊÊý¾Ý¿â£¬Ö»ÄÜͨ¹ýMYSQLÖ÷»úÉϵÄwebÒ³À´·ÃÎÊÁË¡£
grant select,insert,update,delete on mydb.* to [email=test2@localhost]test2@localhost[/email]
Ïà¹ØÎĵµ£º
×î½üÓõ½ÁËÒ»¿îÊý¾Ý¿âͼÐλ¯¹ÜÀí¹¤¾ßNavicat for MySQL £¬Ê¹ÓÃÖ®ºóÓÐÒ»Öָоõ£ºÔÀ´±à³Ì¿ÉÒԺܸßЧ£¡
ÒÔǰʹÓÃMySQLʱ£¬Ã¿´Î¶¼Ö»ÄÜÔÚÀàËÆDOSµÄ½çÃ濪·¢£¬Ê¹Óùٷ½ÌṩµÄ¹¤¾ßºÜÈÝÒ׾ͱ»¿¨µ½ÁË£¬¾õµÃ»¹ÊÇ×ÖÌõ½çÃæ±È½Ï¸ßЧ£¬µ«ÊdzõѧMySQL,ºÜ¶à¹¦Äܶ¼»¹Ã»ÓÐÍêÈ«Çå³þ£¬Ê¹Óð²È«ÐÔÉϵĿ¼ÂÇÒ²²»¹»³ÉÊì¡£ÕâʱºòÎÒ¿ ......
MySQL5.X¶¼ÒѾ·¢²¼ºÃ¾ÃÁË£¬µ«ÊÇ»¹ÓкܶàÈËÈÏΪMySQLÊDz»Ö§³ÖÊÂÎñ´¦ÀíµÄ£¬Õâ²»µÃ²»¹ÖËûÃÇÊǹª¹ÑÎŵģ¬Æäʵ£¬Ö»ÒªÄãµÄMySQL°æ±¾
Ö§³ÖBDB»òInnoDB±íÀàÐÍ£¬ÄÇôÄãµÄMySQL¾Í¾ßÓÐÊÂÎñ´¦ÀíµÄÄÜÁ¦¡£ÕâÀïÃ棬ÓÖÒÔInnoDB±íÀàÐÍÓõÄ×î¶à£¬ËäÈ»ºóÀ´·¢ÉúÁËÖîÈçOracleÊÕ
¹ºInnoDBµÈÁîMySQL²»Ë¬µÄÊÂÇ飬µ«ÄÇЩÉÌÒµÉϵĶ·ÕùÓë¼¼ÊõÎ޹أ ......
MYSQLÓв»Í¬ÀàÐ͵ÄÈÕÖ¾Îļþ(¸÷×Ô´æ´¢Á˲»Í¬ÀàÐ͵ÄÈÕÖ¾)£¬´ÓËüÃǵ±ÖпÉÒÔ²éѯµ½MYSQLÀﶼ×öÁËЩʲô£¬¶ÔÓÚMYSQLµÄ¹ÜÀí¹¤×÷£¬ÕâЩÈÕÖ¾ÎļþÊDz»¿ÉȱÉٵġ£
1.´íÎóÈÕÖ¾(The error log)£º¼Ç¼ÁËÊý¾Ý¿âÆô¶¯¡¢ÔËÐÐÒÔ¼°Í£Ö¹¹ý³ÌÖдíÎóÐÅÏ¢£»
2.ISAM²Ù×÷ÈÕÖ¾(The isam log)£º¼Ç¼ÁËËùÓжÔISAM±íµÄÐ޸ģ¬¸ÃÈÕÖ¾½ö½öÓÃÓÚµ÷ÊÔISAMģʽ ......
MySQL ÖÐÎÄÏÔʾÂÒÂë
Èç¹ûÄãÓöµ½ÂÒÂëÎÊÌ⣬¿ÉÒÔ´ÓÏÂÃ漸¸öÎÊÌâÖð²½¼ì²é£º
£¨1£©¼ì²éÄãµÄÎļþ´æ´¢±àÂëÊÇ·ñºÍ meta ÉùÃ÷µÄÒ»Ö£¬¼ÙÈçÄãµÄÎļþÊÇ°´ÕÕ utf-8 ±àÂë´æ´¢£¬µ«ÊÇ meta È´ÉùÃ÷Ϊ gb2312 £¬½«µ¼ÖÂÂÒÂë¡£
½â¾ö°ì·¨£º½«Ò³Ãæ´æ´¢±àÂëºÍ meta ÉùÃ÷±£³ÖÒ»Ö¡£ÓüÇʱ¾ ......
»·¾³ÉèÖãº
°²×°ÍêMySQLÖ®ºó£¬½«°²×°Ä¿Â¼ÖеÄincludeĿ¼ÏµÄlibmysql.libÎļþ¿½µ½VS2008°²×°Ä¿Â¼ÖеÄVC\lib\Ï£¬È»ºóÔÚ ÏîÄ¿-Ñ¡Ïî-c/c++-³£¹æ Öеĸ½¼Ó°üº¬Ä¿Â¼ÒÔ¼° Á´½ÓÆ÷-³£¹æ Öеĸ½¼Ó¿âĿ¼ÖмÓÈë“c:\MySQL\include\”£¬²¢ÇÒÔÚ Á´½ÓÆ÷-ÊäÈë Öеĸ½¼ÓÒÀÀµÏîÄÚÌí¼Ó“lib ......