Mysql Server安裝教程

Mac安裝Mysql

1.安裝Mysql

2.配置環境變量

打開終端輸入:

sudo vi ~/.bash_profile

復制如下內容

# mysql
alias mysql=’/usr/local/mysql/bin/mysql’
alias mysqladmin=’/usr/local/mysql/bin/mysqladmin’

Ubuntu 安裝 Mysql

1.使用root賬號

sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient-dev

如果中途有問題就執行以下 sudo apt-get update

2.以上3個軟件包安裝完成後,使用如下命令查詢是否安裝成功:

sudo netstat -tap | grep mysql

這裡寫圖片描述

3.重啟Mysql<喎?/kf/ware/vc/" target="_blank" class="keylink">vcD4NCjxibG9ja3F1b3RlPg0KCTxwPi9ldGMvaW5pdC5kL215c3FsIHJlc3RhcnQ8L3A+DQo8L2Jsb2NrcXVvdGU+DQo8aDI+yejWw015U3Fs1LazzLfDzso8L2gyPg0KPHA+MS6x4LytbXlzcWzF5NbDzsS8/qOssNHG5NbQYmluZC1hZGRyZXNzID0gMTI3LjAuMC4x16LKzcHLPC9wPg0KPGJsb2NrcXVvdGU+DQoJPHA+dmkgL2V0Yy9teXNxbC9teS5jbmY8L3A+DQo8L2Jsb2NrcXVvdGU+DQo8cD4yLsq508Nyb290vfjI6215c3Fsw/zB7tDQo6zWtNDQyOfPwjK49sP8we6jrMq+wP3W0G15c3FstcRyb2901cu6xcPcwuujunJvb3Q8L3A+DQo8YmxvY2txdW90ZT4NCgk8cD5HUkFOVCBBTEwgUFJJVklMRUdFUyBPTiA8ZW0+LjwvZW0+IFRPICZsc3F1bztyb290JnJzcXVvO0AmcnNxdW87JSZyc3F1bzsgSURFTlRJRklFRCBCWSAmbHNxdW87cm9vdCZyc3F1bzsgV0lUSCBHUkFOVCBPUFRJT047PC9wPg0KPC9ibG9ja3F1b3RlPg0KPHA+IyC12tK7uPZyb290tcTTw7unw/uju7Xatv649nJvb3TKx8Pcwus8YnIgLz4NCiMgKi4qo7q12tK7uPYqtPqx7cr9vt2/4sP7o7u12rb+uPYqtPqx7bHtw/uho9XiwO+1xNLiy7zKx8v509DK/b7dv+LA77XEy/nT0LHttrzK2siouPjTw7unoaNyb290o7rK2tPocm9vdNXLusWhoyZsZHF1bzslJnJkcXVvO6O6se3KvsrayKi1xNPDu6dJUL/J0tTWuLaoo6zV4sDvtPqx7cjO0uK1xElQtdjWt7a8xNy3w87KTXlTUUzK/b7dv+KhozwvcD4NCjxibG9ja3F1b3RlPg0KCTxwPkZMVVNIIFBSSVZJTEVHRVMgOzwvcD4NCjwvYmxvY2txdW90ZT4NCjxwPiMgy6LQwsioz948L3A+DQo8cD48aW1nIGFsdD0=”這裡寫圖片描述” src=”/uploadfile/Collfiles/20171115/2017111510451857.png” title=”\” />

遠程連接

MySQL 連接遠程資料庫(192.168.1.107),端口“3306”,用戶名為“root”,密碼“root”

mysql -h 192.168.1.107 -P 3306 -uroot -proot

發佈留言