MySQL在linux上的source code安裝方法(configure)

來源:互聯網
上載者:User

標籤:安裝檔案   pid   tmp   linux   efi   ref   user   系統使用者   啟動   

1、建立作業系統使用者和組

[[email protected] ~]# groupadd mysql

[[email protected] ~]# useradd -g mysql mysql

2、解壓安裝檔案,進入解壓目錄:

[[email protected] mnt]# tar -zxvf mysql-5.0.15.tar.gz

[[email protected] mnt]# cd mysql-5.0.15

3、編譯安裝mysql源碼檔案:

[[email protected] mysql-5.0.15]# ./configure --prefix=/usr/local/mysql5015

[[email protected] mysql-5.0.15]# make && make install

4、編輯mysql設定檔

[[email protected] mysql]# pwd

/usr/local/mysql5015/share/mysql

[[email protected] mysql]# cp my-medium.cnf /etc/my.cnf

5、初始化mysql資料庫(在資料目錄下建立系統資料庫和系統資料表,--user表示這些資料庫和表的owner是此使用者):

[[email protected] mysql5015]# bin/mysql_install_db --user=mysql

6、設定目錄許可權:

[[email protected] mysql5015]# chown -R mysql:mysql ../mysql5015/

7、啟動mysql

[[email protected] mysql]# bin/mysqld_safe --user=mysql &

[[email protected] ~]# ps -ef|grep mysql

root      8654 26893  0 13:09 pts/4    00:00:00 /bin/sh bin/mysqld_safe --user=mysql

mysql    10787  8654  1 13:10 pts/4    00:00:00 /usr/local/mysql5015/libexec/mysqld --basedir=/usr/local/mysql5015 --datadir=/usr/local/mysql5015/var --user=mysql --pid-file=/usr/local/mysql5015/var/faspdev.pid --skip-locking --port=3306 --socket=/tmp/mysql.sock

MySQL在linux上的source code安裝方法(configure)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.