二進位安裝mysql方法--5.5.32版本

來源:互聯網
上載者:User

標籤:   伺服器   mysql5.5.27二進位   資料庫   二進位   

二進位安裝mysql方法--5.5.32版本


mysql-5.5.32-linux2.6-x86_64.tar.gz

連結:http://pan.baidu.com/s/1dIIU6 密碼:bv61

1、解壓二進位檔案

tar xf mysql-5.5.32-linux2.6-x86_64.tar.gz


2、拷貝到指定安裝目錄

cp -r mysql-5.5.32-linux2.6-x86_64 /application/mysql


3、進入程式運行目錄下建立資料庫存放目錄

cd /application/mysql/mkdir /application/mysql/data


4、初始化安裝

./scripts/mysql_install_db --user=mysql --basedir=/application/mysql --datadir=/application/mysql/data


5、拷貝mysql伺服器執行程式到/etc/init.d/下面,以便mysqld服務可直接運行

cp  support-files/mysql.server /etc/init.d/mysqld


6、複製設定檔到/etc/下面

cp support-files/my-small.cnf /etc/my.cnf


7、運行服務

/etc/init.d/mysqld start


8、停止服務

/etc/init.d/mysqld restart


9、bash中運行mysql

msyql

如果報錯提示no commod 沒有這個命令,說明profile中無此環境變數,兩種方法,一個是把安裝路徑添加到環境變數,另外一種,

cp /application/mysql/bin/* /usr/local/sbin/

拷貝到已經是環境變數的路徑下亦可

vim  /etc/profilePATH=/application/mysql/bin:$PATHsource /etc/profile



本文出自 “堅持不懈,直到成功” 部落格,請務必保留此出處http://327101303.blog.51cto.com/212957/1617378

二進位安裝mysql方法--5.5.32版本

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.