Ubuntu°²×°MySQL
Ò»¡¢ÑéÖ¤ÔÓÐÖ÷»úÊÇ·ñÒÑ°²×°MySQL£º
ÕâÀïÖ÷ÒªÊÇÔËÐÐsudo netstat -tap | grep mysqlÃüÁî²é¿´ÊÇ·ñÓÐMySQL¼àÌýµÄ¶Ë¿Ú£º
$ netstat -tap | grep mysql
¶þ¡¢°²×°MySQL£º<†·Ÿ"http://www.Bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vc3Ryb25nPjwvaDE+CgogICAg1NrIt8jP1ve7+s60sLLXsE15U1FMuvOjrNTL0NDD/MHuc3VkbyBhcHQtZ2V0IGluc3RhbGwgbXlzcWwtc2VydmVyIG15c3FsLWNsaWVudL340NDU2s/fsLLXsKO6CgoKPHByZSBjbGFzcz0="brush:sql;">$ sudo apt-get install mysql-server mysql-client
ÔÚ°²×°µÄ¹ý³ÌÖлáÌáʾÄãÊäÈëYes£¬È»ºó»áµ¯³örootÃÜÂëÉèÖýçÃ棬ÕâÀï¿ÉÒÔÏÈÉèÖÃÒ»¸örootÃÜÂë×÷ΪµÇ¼mysqlÓû§Ê¹Óã¬Ö®ºóÐèÒªµÄʱºòÒ²¿ÉÒÔÔËÐÐmysqladmin -u root -p password½øÐÐÐÞ¸ÄÃÜÂ룬µ±È»ÄǸöʱºòµÃÏÈÊäÈëÔÃÜÂëÁË¡£
$ mysqladmin -u root -p password
Èý¡¢Æô¶¯MySQL£º
UbuntuĬÈÏ¿ª»úÆô¶¯MySQL·þÎñ£¬Í¬Ê±£¬Ò²¿ÉÒÔÊäÈëÃüÁîÀ´Æô¶¯ºÍ¹Ø±ÕMySQL£º
# Æô¶¯MySQL$ sudo service mysql start # ¹Ø±ÕMySQL$ sudo service mysql stop# ÖØÆôMySQL$ sudo service mysql restart
# ÆäËûÃüÁ$ sudo /etc/init.d/mysql start$ sudo /etc/init.d/mysql stop$ sudo /etc/init.d/mysql restart
È»ºó£¬ÔٴμüÈëÃüÁîÀ´¼ì²éÊÇ·ñÒÑÆô¶¯MySQL£º
$ netstat -tap | grep mysql
MySQL¼àÌýÔÚlocalhost£¬ËµÃ÷MySQLÒѾÆô¶¯¡£
ËÄ¡¢µÇ¼MySQL£º
ʹÓÃÃüÁîÐÐmysql -u root -p À´µÇ¼MySQL£º
$ mysql -u root -p
P.S. ×î½ü³¢ÊÔUbuntu°²×°MySQL£¬Áô×÷²Î¿¼¡£¹ØÓÚÅäÖÃÎÊÌ⣬ºóÃæÏÂÎĽâÎö¡£