ʵÓÃMYSQLÃüÁî´óÈ«
Ò»¡¢Á¬½ÓMYSQL
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû -pÓû§ÃÜÂë
1¡¢ÈôÊÇÁ¬½Óµ½±¾»úÉϵÄMYSQL£ºÊ×ÏÈ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼mysql\bin£¬»òÕß½«mysql\bin°²×°Â·¾¶ÉèÖÃÔÚ»·¾³±äÁ¿pathÖУ¬ÔÙ¼üÈëÃüÁî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µÄÃÜÂ룬ËûÒ²ÎÞ·¨
Ïà¹ØÎĵµ£º
LOAD DATA INFILE
ÕâÊÇÎÒÃÇÒª½éÉܵÄ×îºóÒ»¸öµ¼ÈëÊý¾Ýµ½MySQLÊý¾Ý¿âÖеķ½·¨¡£Õâ¸öÃüÁîÓëmysqlimport·Ç³£ÏàËÆ£¬µ«Õâ¸ö·½·¨¿ÉÒÔÔÚmysqlÃüÁîÐÐÖÐʹÓá£Ò²¾ÍÊÇ˵Äú¿ÉÒÔÔÚËùÓÐʹÓÃAPIµÄ³ÌÐòÖÐʹÓÃÕâ¸öÃüÁʹÓÃÕâÖÖ·½·¨£¬Äú¾Í¿ÉÒÔÔÚÓ¦ÓóÌÐòÖе¼ÈëÄúÏëÒªµ¼ÈëµÄÊý¾Ý¡£ ʹÓÃÕâ¸öÃüÁî֮ǰ£¬mysqld½ø³Ì£¨·þÎñ£©±ØÐëÒѾÔÚÔËÐ ......
À´Ô´:Ô¹ⲩ¿Í ºËÐÄÌáʾ£ºMySQLµÄ¹ÜÀíά»¤¹¤¾ß·Ç³£¶à£¬³ýÁËϵͳ×Ô´øµÄÃüÁîÐйÜÀí¹¤¾ßÖ®Í⣬»¹ÓÐÐí¶àÆäËûµÄͼÐλ¯¹ÜÀí¹¤¾ß£¬ÕâÀïÎÒ½éÉÜÎå¸öÎÒ¾³£Ê¹ÓõÄMySQLͼÐλ¯¹ÜÀí¹¤¾ß£¬¹©´ó¼Ò²Î¿¼¡£ MySQLÊÇÒ»¸ö·Ç³£Á÷ÐеÄСÐ͹ØϵÐÍÊý¾Ý¿â¹ÜÀíϵͳ£¬2008Äê1ÔÂ16ºÅ±»Sun¹«Ë¾ÊÕ¹º¡£Ä¿Ç°MySQL±»¹ã·ºµØÓ¦ÓÃÔÚInternet ......
mysqlÔÚsdkÖÐΪcÓïÑÔÌṩÁËһЩ·ÃÎʽӿڣ¬ÎÒÃÇ¿ÉÒÔʹÓÃÕâЩ½Ó¿ÚÁ¬½Ó²¢·ÃÎÊmysqlÊý¾Ý¿â£¬µ±È»Ò²¿ÉÒÔµ÷ÓÃmysqlµÄ´æ´¢¹ý³Ì¡£
Àý×Ó£º
Ê×ÏÈÏÂÔØmysqlµÄsdk£¬½âѹºÃÒÔºó£¬ÀïÃæ°üº¬Ò»¸öinclude,ºÍlibÎļþ¼Ð¡£ÎÒÃÇÔÚ×Ô¼ºµÄ¹¤³ÌÖаüº¬ÕâÁ½¸öÎļþ¼ÐµÄĿ¼£¬²¢Ç ......
grant replication slave on *.* to backup@192.168.188.128 identified by "123456";
grant replication slave on *.* to backup@192.168.188.8 identified by "123456";
service mysql stop
server_id = 1
log-bin = mysql-bin
log-error=mysql-error
master-host = 192.168.188.8
master-user = ba ......
Êý¾Ý¿âµÄÓÅ»¯ÊÇϵͳÓÅ»¯µÄÖØÒª·½Ã棬¶øÊý¾Ý¿âÓÅ»¯µÄ»ù´¡ÊÇ»ùÓÚͳ¼ÆÊý¾Ý£¬ÏÂÃæµÄÕâЩÃüÁî¿ÉÒÔ°ïÖúÎÒÃÇÁ˽âÊý¾Ý¿âµÄ״̬¡£±ÈÈçÓÃshow table status from ecl where rows>10000;¿ÉÒÔ¿´ÄÄЩÊý¾Ý¿â±í±È½Ï´ó£¬È»ºó¿´¿´ÕâЩ±íµÄÉèÖá¢Ë÷ÒýµÈÊÇ·ñÓÐÎÊÌâ¡£
1. show tables»òshow tables from dat ......