MySQLÊÇÒ»¸öСÐ͹ØϵÊý¾Ý¿â¹ÜÀíϵͳ£¬Ä¿Ç°±»¹ã·ºµÄÓ¦ÓÃÔÚInternetÉϵÄÖÐСÐÍÍøÕ¾ÖУ¬Ìå»ýС¡¢Ëٶȿ졢×ÜÌåÓµÓгɱ¾µÍ£¬ÓÈÆäÊÇ¿ª·ÅÔ´ÂëÕâÒ»Ìص㣬ʹµÃÐí¶àÖÐСÐÍÍøÕ¾¶¼²ÉÓÃMySQL×÷ΪÍøÕ¾µÄÊý¾Ý¿â¡£ÏÂÃæ¾ÍÓÉÎÒ¸ø´ó¼Ò½éÉÜÒÔÏÂMySQLÊý¾Ý¿âµÄ³£¹æ²Ù×÷¡£ |
°²×°MySQLÐèÒªÒÔÏÂÁ½¸öÎļþ£¬´ó¼Ò¶¼¿ÉÒÔÔÚ¹ÙÍøÉÏÏÂÔØ£º
MySQL-server-5.2.0-0.glibc23.i386.rpm
MySQL-client-5.2.0-0.glibc23.i386.rpm
·þÎñÆ÷¶ËºÍ¿Í»§¶ËµÄ°²×°ÃüÁîÈçÏ£º
[root@test1 local]# rpm -ivh MySQL-server-5.2.0-0.glibc23.i386.rpm [root@test1 local]# rpm -ivh MySQL-client-5.2.0-0.glibc23.i386.rpm
·þÎñÆ÷¶Ë²âÊÔÊÇ·ñ°²×°³É¹¦£¬¿ÉÔËÐÐnetstat²é¿´MySQL¶Ë¿ÚÊÇ·ñ´ò¿ª£¬Ä¬È϶˿ÚÊÇ3306£¬ÃüÁîÈçÏ£º
[root@test1 local]# netstat -nat
MySQL°²×°Íê³ÉºóÆô¶¯ÎļþmysqlÔÚ/etc/init.dĿ¼Ï£¬ÔÚÐèÒªÆô¶¯Ê±£¬ÔËÐÐÒÔÏÂÃüÁî¼´¿É£º
[root@test1 init.d]# /etc/init.d/mysql start
×¢Ò⣺Òò°æ±¾²»Í¬¿ÉÄÜÔì³ÉÃüÁͬ£¬Õâ¶ùÖ»Áоٱ¾°æ±¾µÄÃüÁÆäËü°æ±¾ÇëÎʶÈÄï¡£
[root@test1 local]# service mysqld stop [root@test1 local]# service mysqld restart
MySQL°²×°Íêºó²»ÏñSQL serverĬÈÏ°²×°ÔÚÒ»¸öĿ¼ÖУ¬ËüµÄÊý¾Ý¿âÎļþ¡¢ÅäÖÃÎļþÒÔ¼°ÃüÁîÎļþ·Ö±ðÔÚ²»Í¬µÄĿ¼ÖУ¬ÏÂÃæ½éÉܼ¸¸öĿ¼£º
1.Êý¾Ý¿âĿ¼
/etc/lib/mysql/
2.ÅäÖÃÎļþ
/usr/share/mysql(mysql.serverÃüÁî¼°ÅäÖÃÎļþ)
3.Ïà¹ØÃüÁî
/usr/bin(mysqladmin¡¢mysqldumpµÈÃüÁî)
4.Æô¶¯½Å±¾
/etc/rc.d/init.d/
MySQLĬÈÏûÓÐÃÜÂ룬°²×°ÍêºóÔö¼ÓÃÜÂëµÄÖØÒªÐÔÊDz»ÑÔ¶øÓ÷µÄ¡£
1.ÃüÁî
usr/bin/mysqladmin -u root password \'new-password'\
¸ñʽ£ºmysqladmin -u Óû§Ãû -p ¾ÉÃÜÂë password ÐÂÃÜÂë
2.Àý×Ó£¨¸øroot¼ÓÃÜÂë123456£©£º
[root@test1 local]# usr/bin/mysqladmin -u root password 123456
×¢Ò⣺ÒòΪ¿ªÊ¼Ê±rootûÓÐÃÜÂ룬ËùÒÔ-p¾ÉÃÜÂë¿ÉÒÔÊ¡ÂÔ¡£
1.±¸·ÝÊý¾Ý¿â
mysqldump –user=root –password=rootÃÜÂë –lock-all-tables Êý¾Ý¿âÃû > ±¸·ÝÎļþ.sql
2.»Ö¸´Êý¾Ý¿â
mysql -u root –password=rootÃÜÂë Êý¾Ý¿âÃû < ±¸·ÝÎļþ.sql
±¾ÎÄÔ´´µØÖ·£ºhttp://www.linuxprobe.com/mysql-server-setup.html×÷Õߣº·ëç÷£¬ÉóºËÔ±£ºåÌÔö±¦