Berikut langkah-langkahnya , pastikan anda masuk sebagai root untuk menjalankan command berikut :
1. Masuk ke Directory /usr/local : [root@web ~]#cd /usr/local/
[root@web ~]#tar xzfv mysql-5.0.45-linux-i686-glibc23.tar.gz
[root@web ~]#mv mysql-5.0.45-linux-i686-glibc23/ mysql
5. buat group dan user mysql sebagai berikut
[root@web ~]#groupadd mysql
[root@web ~]#useradd -g mysql mysql
6. masuk ke direktori mysql dan berikan hak akses ke user dan group mysql
[root@web ~]#/usr/local/mysql/scripts/mysql_install_db –user=mysql
[root@web ~]#chown -R root .
[root@web ~]#chown -R mysql data
[root@web ~]#chgrp -R mysql .
7. Jalankan mysql daemon untuk mysql
[root@web ~]#/usr/local/mysql/bin/mysqld_safe –user=mysql &
8. Konfigurasi password untuk user root (user mysql)
[root@web ~]#/usr/local/mysql/bin/mysqladmin -u root password pass-anda
9. Jalankan mysql
[root@web ~]#/usr/local/mysql/bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11 to server version: 5.0.27-standard
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
10. Supaya semua user dapat mengakses dan menjalankan mysql dari shell masing-masing maka masukan directory /usr/local/mysql/bin ke dalam path.
[root@web ~]#PATH=$PATH:/usr/local/mysql/bin/
[root@web ~]#export PATH
0 komentar:
Posting Komentar