15 November 2008

My SQL Yeuh

Aep's

Instalasi dan konfigurasi mysql-5.0.45
1. login sebagai root dan buat group mysql untuk menjalankan aplikasi:
[root@webserver /]# ./usr/sbin/groupadd mysql
2. Buat user mysql untuk menjalankan aplikasi
[root@webserver /]# ./usr/sbin/useradd -g mysql mysql
3. Extract file mysql-5.0.45-linux
[root@webserver local]# gunzip /home/gunawan/mysql-5.0.45-linux-i686-glibc23.tar.gz | tar xvf -
4. Buat link file
[root@webserver local]# ln -s /home/gunawan/mysql-5.0.45-linux-i686-glibc23 mysql
[root@webserver local]# cd mysql
5. Rubah kepemilikan user
[root@webserver mysql]# chown -R mysql .
6. Rubah kepemilikan group
[root@webserver mysql]# chgrp -R mysql .
7. Jalankan script untuk mengaktifkan mysql
[root@webserver mysql]# scripts/mysql_install_db –user=mysql
Neither host ‘webserver’ nor ‘localhost’ could be looked up with ./bin/resolveip
Please configure the ‘hostname’ command to return a correct hostname.
If you want to solve this at a later stage, restart this script with the –force option
[root@webserver mysql]# scripts/mysql_install_db –force –user=mysql
Installing MySQL system tables…
OK
Filling help tables…
OK

Setelah semuanya di install, kita harus melakukan testing

[root@webserver mysql]# ./support-files/mysql.server status
MySQL running (7585) [ OK ]

8. Agar mysql dijalankan pada saat server/mesin berjalan lakukan konfigurasi pada file /etc/rc.local
[root@webserver mysql]# vi /etc/rc.local

—sesuaikan path-nya dengan direktori instalasi anda
./home/gunawan/mysql-5.0.45-linux-i686-glibc23/bin/mysqld_safe –user=mysql &

No comments: