Ubuntu 11.10下MySQL 5.5解壓版本安裝

來源:互聯網
上載者:User

Ubuntu 11.10 環境中。【大部分命令需要root許可權,用root操作,或者命令加上sudo】

更多Oracle相關資訊見Oracle 專題頁面 http://www.bkjia.com/topicnews.aspx?tid=12

1、下載MySQL免安裝版/二進位版軟體(不用編譯)http://www.mysql.com/downloads/mysql/
比如我下載了mysql-5.5.2-m2-linux-i686-glibc23.tar.gz

2、建立mysql組,建立mysql使用者並加入到mysql組中
#groupadd mysql
#useradd -g mysql mysql

3.解壓
#cd ~/Downloads
#tar zxvf mysql-5.5.2-m2-linux-i686-glibc23.tar.gz
移動到/opt/mysql中
#mv mysql-5.5.2-m2-linux-i686-glibc23 /opt/mysql
#cd /opt/mysql
#chown -R mysql .
#chgrp -R mysql .
#scripts/mysql_install_db --user=mysql --basedir=/opt/mysql
#chown -R root .
#chown -R mysql data

4.設定檔
#cp support-files/my-medium.cnf /etc/my.cnf
#vi /etc/my.cnf
[mysqld]配置中加入

  1. basedir         =/opt/mysql   
  2. datadir         =/opt/mysql/data  
  • 1
  • 2
  • 下一頁

相關文章

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.