Ubuntu 10.10 mysql 5.5.8 설치
0. 설치에 앞서
MySQL을 설치하기 위해서 우분투 10.10 에서는 g++이랑 libncurses5-dev 를 설치해줘야한다.
$ sudo apt-get install g++ libncurses5-dev cmake (or cmake-gui)
1. 다운로드
다운에 앞서 몇가지 설치 방식을 보면
Generic Binaries
RPM Packages
Native Package Manager
Source Compile
정도로 분류가 된다.
Generic Binaries는
이미 컴파일 된 상태의 것으로, 그냥 내려받아서 그대로 사용하면 된다. 가장 간단할 수 있겠다.
RPM은
RPM으로 설치하면 되고 Native Package Manager는 yum(Redhat Linux, Fedora CentOS) 이라든가,
apt-get(Debian, Ubuntu, Kubuntu) 라든가, emergy(Gentoo Linux) 명령어를 이용해서 쉽게 설치하는 방식이다.
Source Compile은 말 그대로다.
소스 파일을 다음의 방식으로 다운을 받자.
http://downloads.mysql.com/archives.php?p=mysql-5.5&v=5.5.8
또는
http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.8.tar.gz
2. 설치
Configure, build and install
# Preconfiguration setup
$ sudo groupadd mysql
$ sudo useradd -r -g mysql mysql
# Beginning of source-build specific instructions
$ tar zxvf mysql-VERSION.tar.gz
$ cd mysql-VERSION
$ cmake .
$ make
$ sudo make install
# End of source-build specific instructions
# Postinstallation setup
$ cd /usr/local/mysql
$ sudo chown -R mysql .
$ sudo chgrp -R mysql .
$ sudo scripts/mysql_install_db --user=mysql
$ sudo chown -R root .
$ chown -R mysql data
# Next command is optional
$ sudo cp support-files/my-medium.cnf /etc/my.cnf
$ sudo bin/mysqld_safe --user=mysql &
# Next command is optional
$ sudo cp support-files/mysql.server /etc/init.d/mysqld
3. 자동 시작 설정
$ sudo chkconfig -a mysqld
$ sudo chkconfig mysqld on
chkconfig 이 없다면 sudo apt-get install chkconfig 해서 설치하자.
4. 계정 생성과 접속
$ sudo ./bin/mysqladmin -u root password 'New Password'
$ sudo ./bin/mysqladmin -u root -h Lynx(사용자명) password 'New Password'
$ mysql
ERROR:
/usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
답글 > mysql data 디렉토리 퍼미션만 수정