ubuntu涓媘ysql瀹夎鍜屼嬌鐢?/strong>
sudo apt-get install mysql-server
sudo apt-get install mysql-client
涓鏃﹀畨瑁呭畬鎴愶紝MySQL 鏈嶅姟鍣ㄥ簲璇ヨ嚜鍔ㄥ惎鍔ㄣ傛偍鍙互鍦ㄧ粓绔彁紺虹鍚庤繍琛屼互涓嬪懡浠ゆ潵媯鏌?MySQL 鏈嶅姟鍣ㄦ槸鍚︽鍦ㄨ繍琛岋細
sudo netstat -tap | grep mysql
褰撴偍榪愯璇ュ懡浠ゆ椂錛屾偍鍙互鐪嬪埌綾諱技涓嬮潰鐨勮
tcp 0 0 localhost.localdomain:mysql *:* LISTEN -
濡傛灉鏈嶅姟鍣ㄤ笉鑳芥甯歌繍琛岋紝鎮ㄥ彲浠ラ氳繃涓嬪垪鍛戒護鍚姩瀹冿細
sudo /etc/init.d/mysql restart
榪涘叆mysql
mysql -uroot -p
浼氭彁紺鴻緭鍏ysql瀵嗙爜錛岀劧鍚庡氨鍙繘鍏ュ叾鍚庡彴鎺у埗紼嬪簭鐣岄潰錛?br />
root@ubuntu:/home/heyao# sudo /etc/init.d/mysql restart
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
root@ubuntu:/home/heyao# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 44
Server version: 5.1.37-1ubuntu5 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| phpmyadmin |
+--------------------+
3 rows in set (0.02 sec)
鏈畬寰呯畫錛屾寔緇洿鏂頒腑錛侊綖锝烇綖锝?br />

]]>