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

MySQL °²×° (»ù±¾²Ù×÷)

ËäȻ˵°²×°·½±ãжÔØ·½±ã¡£¡£
µ«ÊÇжÔغó°²×°»òÕßÉý¼¶ºó»áÌáʾ·þÎñÆô¶¯²»ÁË£¬½â¾ö·½·¨ÈçÏÂ
жÔØËü
cmdÏ£¬sc deleteÃüÁî ÓÃÀ´É¾³ý·þÎñµÄ
×¢²á±í²éÕÒmysql ×¢Òâ²»Òª°Ñϵͳ¼üɾ³ýÁË
ɾ³ýÊý¾ÝÎļþ¼Ð£¬°üÀ¨Êý¾Ý¿âµÄºÍ»º´æµÄ
ÕâÑù¶¼²»ÐеĻ°£¬Äã¾Í¸ÄÒ»¸ö·þÎñÃû°É¡£¡£¡£¡£
ÄïµÄ¡£¡£
MySQLµÄ³õ¼¶Ê¹ÓÃ
ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
ln -s /usr/local/mysql/include/mysql /usr/include/mysql
ÓкܶàÅóÓÑËäÈ»°²×°ºÃÁËmysqlµ«È´²»ÖªÈçºÎʹÓÃËü¡£ÔÚÕâƪÎÄÕÂÖÐÎÒÃǾʹÓÁ¬½ÓMYSQL¡¢ÐÞ¸ÄÃÜÂë¡¢Ôö¼ÓÓû§µÈ·½ÃæÀ´Ñ§Ï°Ò»Ð©MYSQLµÄ³£ÓÃÃüÁî¡£
Ò»¡¢Á¬½ÓMYSQL¡£
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £­pÓû§ÃÜÂë
1¡¢Àý1£ºÁ¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈÔÚ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼ mysqlbin£¬ÔÙ¼üÈëÃüÁîmysql -uroot -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂ룬Èç¹û¸Õ°²×°ºÃMYSQL£¬³¬¼¶Óû§rootÊÇûÓÐÃÜÂëµÄ£¬¹ÊÖ±½Ó»Ø³µ¼´¿É½øÈëµ½MYSQLÖÐÁË£¬MYSQLµÄÌáʾ·ûÊÇ£ºmysql>
2¡¢Àý2£ºÁ¬½Óµ½Ô¶³ÌÖ÷»úÉϵÄMYSQL¡£¼ÙÉèÔ¶³ÌÖ÷»úµÄIPΪ£º110.110.110.110£¬Óû§ÃûΪroot,ÃÜÂëΪabcd123¡£Ôò¼üÈëÒÔÏÂÃüÁ
mysql -h110.110.110.110 -uroot -pabcd123
£¨×¢:uÓëroot¿ÉÒÔ²»Óüӿոñ£¬ÆäËüÒ²Ò»Ñù£©
3¡¢Í˳öMYSQLÃüÁ exit £¨»Ø³µ£©
¶þ¡¢ÐÞ¸ÄÃÜÂë¡£
¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
1¡¢Àý1£º¸øroot¼Ó¸öÃÜÂëab12¡£Ê×ÏÈÔÚDOSϽøÈëĿ¼mysqlbin£¬È»ºó¼üÈëÒÔÏÂÃüÁî
mysqladmin -uroot -password ab12
×¢£ºÒòΪ¿ªÊ¼Ê±rootûÓÐÃÜÂ룬ËùÒÔ-p¾ÉÃÜÂëÒ»Ïî¾Í¿ÉÒÔÊ¡ÂÔÁË¡£
2¡¢Àý2£ºÔÙ½«rootµÄÃÜÂë¸ÄΪdjg345¡£
mysqladmin -uroot -pab12 password djg345
Èý¡¢Ôö¼ÓÐÂÓû§¡££¨×¢Ò⣺ºÍÉÏÃ治ͬ£¬ÏÂÃæµÄÒòΪÊÇMYSQL»·¾³ÖеÄÃüÁËùÒÔºóÃ涼´øÒ»¸ö·ÖºÅ×÷ΪÃüÁî½áÊø·û£©
¸ñʽ£ºgrant select on Êý¾Ý¿â.* to Óû§Ãû@µÇ¼Ö÷»ú identified by "ÃÜÂë"
Àý1¡¢Ôö¼ÓÒ»¸öÓû§test1ÃÜÂëΪabc£¬ÈÃËû¿ÉÒÔÔÚÈκÎÖ÷»úÉϵǼ£¬²¢¶ÔËùÓÐÊý¾Ý¿âÓвéѯ¡¢²åÈë¡¢Ð޸ġ¢É¾³ýµÄȨÏÞ¡£Ê×ÏÈÓÃÒÔrootÓû§Á¬ÈëMYSQL£¬È»ºó¼üÈëÒÔÏÂÃüÁ
grant select,insert,update,delete on *.* to test1@"%
" Identified by "abc";
µ«Àý1Ôö¼ÓµÄÓû§ÊÇÊ®·ÖΣÏյģ¬ÄãÏëÈçij¸öÈËÖªµÀtest1µÄÃÜÂ룬ÄÇôËû¾Í¿ÉÒÔÔÚinternetÉϵÄÈκÎһ̨µçÄÔÉϵǼÄãµÄmysqlÊý¾Ý¿â²¢¶ÔÄãµÄÊý¾Ý¿ÉÒÔΪËùÓûΪÁË£¬½â¾ö°ì·¨¼ûÀý2¡£
Àý2¡¢Ôö¼ÓÒ»¸öÓû§test2ÃÜÂëΪabc,ÈÃËûÖ»¿ÉÒÔÔÚ


Ïà¹ØÎĵµ£º

MySQL Master Slave Replication

MySQL±¾ÉíûÓÐÌṩreplication failoverµÄ½â¾ö·½°¸(¼ûHow can I use replication to provide redundancy or high availability?)
ÈçºÎʹReplication·½°¸¾ßÓÐHA£¿
´ð°¸ÊÇMMM(MySQL Master-Master Replication Manager)
MMM¶ÔMySQL Master-Slave Replication¾ø¶ÔÊÇÒ»¸öºÜÓÐÒæµÄ²¹³ä!
ÒýÑÔ
Master-SlaveµÄÊý¾Ý¿â»ú¹¹ ......

RedhatÏ Apache, php, mysqlµÄĬÈÏ°²×°Â·¾¶

apache:
Èç¹û²ÉÓÃRPM°ü°²×°£¬°²×°Â·¾¶Ó¦ÔÚ /etc/httpdĿ¼ÏÂ
apacheÅäÖÃÎļþ:/etc/httpd/conf/httpd.conf
ApacheÄ£¿é·¾¶£º/usr/sbin/apachectl
webĿ¼:/var/www/html
Èç¹û²ÉÓÃÔ´´úÂë°²×°£¬Ò»°ãĬÈÏ°²×°ÔÚ/usr/local/apache2Ŀ¼ÏÂ
php:
Èç¹û²ÉÓÃRPM°ü°²×°£¬°²×°Â·¾¶Ó¦ÔÚ /etc/Ŀ¼ÏÂ
phpµÄÅäÖÃÎļþ:/etc/php.ini ......

½â¾öÖÐÎÄ´æÈëMySql³öÏÖÂÒÂëÎÊÌâ

½â¾ö°ì·¨£ºÔÚÁ¬½Ó×Ö·û´®ÖÐ˵Ã÷Á¬½Ó×Ö·ûµÄÊôÐÔ£¬È磺
    <add name="server_mysql" connectionString="server=127.0.0.1;user id=root; password=123; database=baiduemail; pooling=false;charset=gbk"/>
»òÕßÊÇ;charset=gb2312
ÁíÍâ×¢Ò⣺ÔÚ´´½¨mysqlÊý¾Ý¿âµÄ±íµÄʱºòÑ¡Ôñ±àÂ뼯gbk ......

apache tomcat mysql ¸ºÔØƽºâºÍ¼¯Èº¼¼Êõ

¹«Ë¾¿ª·¢ÁËÒ»¸öÍøÕ¾£¬¹À¼Æ×î¸ßÔÚÏßÈËÊýÊÇ3 Íò£¬²¢·¢ÈËÊý×î¶à100 ÈË¡£¿ª·¢µÄÍøÕ¾ÊÇ·ñÄÜ·ñ³ÐÊÜÕâ¸öѹÁ¦£¬ÈçºÎÈ·±£ÍøÕ¾µÄ¸ººÉûÓÐÎÊÌ⣬¾­¹ýÑо¿¾ö¶¨ÈçÏ£º
£¨1 £©²ÉÓøºÔØƽºâºÍ¼¯Èº¼¼Êõ£¬³õ²½»ú¹¹²ÉÓÃApache Tomcat µÄ»úȺ¼¼Êõ¡£
£¨2 £©²ÉÓÃѹÁ¦²âÊÔ¹¤¾ß£¬²âÊÔѹÁ¦¡£¹¤¾ßÊÇLoadrunner.
Ó²¼þ»·¾³´î½¨£º
ΪÁËÄܹ»½øÐÐѹÁ¦² ......

MySqlÖг£¼ûµÄÃüÁ

Ò»¡¢Á¬½ÓMYSQL¡£
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £­pÓû§ÃÜÂë
1¡¢Á¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼mysql\bin£¬ÔÙ¼üÈëÃüÁîmysql -u root -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂë.×¢ÒâÓû§ÃûÇ°¿ÉÒÔÓпոñÒ²¿ÉÒÔûÓпոñ£¬µ«ÊÇÃÜÂëÇ°±ØÐëûÓпոñ£¬·ñÔòÈÃÄãÖØÐÂÊäÈëÃÜÂë.
Èç¹û ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ