-->

MySQL + PHPMyadmin slackware 13

1. Cek terlebih dahulu apakah Paket MySQL sudah terinstall apa belum
root@chuching:~# ls /var/log/packages/ | grep mysql
mysql-5.0.84-i486-1
root@chuaching:~#

Jika ada output mysql-5.0.84-i486-1, maka MySQL telah terinstall dan langkah selanjutnya hanya mengkonfigurasi dan menjalankannya.

Jika tidak keluar output seperti diatas lakukan instalasi

root@chuching:~#slackpkg install mysql

2. Buat direktori data dan table system dari MySQL. Berikut caranya:
root@chuachi:~# mysql_install_db

atau

root@chuaching:~# su mysql
root@chuaching:~# mysql_install_db

3. Ubah owner dari direktori data MySQL ke user dan group "mysql". Untuk jaga-jaga, kita bisa ganti permissionnya juga

root@chuaching:~# chown -R mysql.mysql /var/lib/mysql/
root@chuaching:~# chmod -R 755 /var/lib/mysql/

4. Jalankan MySQL dengan mengeksekusi init script-nya. Sebelumnya pastikan bahwa permission dari init script tersebut sudah executable.

root@chuaching:~# chmod +X /etc/rc.d/rc.mysqld
root@chuaching:~# /etc/rc.d/rc.mysqld start

5. Buat password MySQL untuk user root. untuk contoh password root MySQL = 123456.

root@chuaching:~# mysqladmin -u root password 'serverku'

6. Silahkan akses MySQL server.

root@chuaching:~# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.37 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>

sampai pada tahap ini, MySQL server telah siap kita gunakan.

7. Menambahkan PHPmyadmin

root@chuaching:#wget http://biznetnetworks.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.3/phpMyAdmin-3.3.3-all-languages.tar.bz2

kemudian extrak pada direktori root apache

Lanjutkan dengan membuat file
touch /etc/httpd/phpMyAdmin.conf
vi /etc/httpd/phpMyAdmin.conf

Add an alias to httpd (since the phpMyAdmin directory isn't in var/www/htdocs) and change the Directory rules.

#
# phpMyAdmin - MySQL Database Administration Tool
#

Alias /phpMyAdmin /srv/www/htdocs/phpMyAdmin


# AllowOverride None
# Options None
Order allow,deny
Allow from all

Tambahkan ini pada httpd.conf
Include /etc/httpd/phpMyAdmin.conf

Edit /srv/www/phpMyAdmin/config.inc.php:
$cfg['blowfish_secret'] = '123456'
$cfg['Servers'][$i]['auth_type'] = 'cookie';

Iklan adsense