최근에 시스템을 다시 설치하다보니 설치와 관련된 글을 많이 올리게 되네요. 아직 jdk1.6 이 설치되고 있는 중에 mysql 환경 설정이나 해보려고 합니다.
먼저 서버를 포트를 이용해서 설치합니다.
/usr/ports/database/mysql51-server 에서 make install clean 을 합니다.
설치할 때 옵션으로 charset 을 설정할 수도 있습니다.
포트를 이용한 설치는 별다른 문제없이 끝날겂입니다.
설치가 되면 데이터베이스를 초기화하는 작업을 수행해야 합니다.
이와 관련된 내용은 mysql.com 홈페이지의 mysql 5.1 reference 를 살펴보시면 자세히 기록되어 있습니다
해당 내용을 살펴보면 mysql_install_db 를 수행해야 한다는 것입니다.
[root /home/shinnara]# whereis mysql_install_db
mysql_install_db: /usr/local/bin/mysql_install_db
[root /home/shinnara]# mysql_install_db --user=mysql
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/bin/mysqladmin -u root password 'new-password'
/usr/local/bin/mysqladmin -u root -h shinnara password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr/local ; /usr/local/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/local/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
별 어려움 없이 데이터베이스도 초기화가 되는 군요..
그러면 이제 서버를 띄워봐야 겠습니다.
[root /home/shinnara]# /usr/local/bin/mysqld_safe &
[1] 61709
[root /home/shinnara]# 070901 01:13:04 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
[root /home/shinnara]# mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.21-beta FreeBSD port: mysql-server-5.1.21
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
[1] 61709
[root /home/shinnara]# 070901 01:13:04 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
[root /home/shinnara]# mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.21-beta FreeBSD port: mysql-server-5.1.21
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
제대로 설치가 되긴 했나봅니다. 이런 작업을 하고 있는 지금도 jdk 1.6 은 여전히 인스톨 과정 중이네요. 벌써 50분이 다 되어가는데.. ^^
댓글을 달아 주세요