Jobsheet Praktikum Ke 15 Database Server

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

JOBSHEET PRAKTIKUM KE 15

DATABASE SERVER

1. Ketik apt install php7.3 php7.3-mysql

2. Ketik apt install mariadb-server


3. Ketik mysql -u root -p dan masukkan password root kalian

4. Ketik show databases;


5. Ketik create database daffa

6. Ketik create user ‘daffa’@’localhost’ identified by ‘123’;


7. Ketik grant all privileges on *.* to ‘daffa’@’localhost’;

8. Ketik flush privileges;


9. Ketik quit

10. Ketik wget https://files.phpmyadmin.net/phpMyAdmin/4.9.0.1/phpMyAdmin-


4.9.0.1-all-languages.tar.gz
11. Ketik tar -zxvf phpMyAdmin-4.9.0.1-all-languages.tar.gz

12. Ketik mv phpMyAdmin-4.9.0.1-all-languages /usr/share/phpMyAdmin


13. Ketik cp -pr /usr/share/phpMyAdmin/config.sample.inc.php
/usr/share/phpMyAdmin/config.inc.php

14. Ketik nano /usr/share/phpMyAdmin/config.inc.php


15. Cari bagian ini dan ubah menjadi:
$cfg['blowfish_secret'] = 'Isidenganapasajaboleh'; /* YOU MUST FILL IN THIS FOR
COOKIE AUTH! */

16. Cari bagian ini dan ubah menjadi:


/* User used to manipulate with storage */
$cfg['Servers'][$i]['controlhost'] = 'localhost'; /*<------- isi dengan "localhost"*/
$cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
17. Cari bagian ini dan hilangkan tanda // di depannya menjadi seperti ini:
/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';

Lalu save
18. Ketik mysql < /usr/share/phpMyAdmin/sql/create_tables.sql -u root –p dan
masukkan password root kalian

19. Ketik mysql -u root -p dan masukkan password root kalian


20. Ketik GRANT ALL PRIVILEGES ON phpmyadmin.* TO 'pma'@'localhost' IDENTIFIED BY
'pmapass';

21. Ketik FLUSH PRIVILEGES;


22. Ketik quit;

23. Ketik nano /etc/apache2/sites-available/phpmyadmin.conf


24. Masukkan script ini, lalu save
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8

<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require all granted
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>

<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require all granted
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
25. Ketik /usr/sbin/a2ensite phpmyadmin

26. Ketik mkdir /usr/share/phpMyAdmin/tmp


27. Ketik chmod 777 /usr/share/phpMyAdmin/tmp

28. Ketik chown -R www-data:www-data /usr/share/phpMyAdmin


29. Ketik /etc/init.d/apache2 restart jika muncul tulisan OK maka konfigurasi berhasil

30. Buka browser kalian dan ketik 192.168.1.5/phpmyadmin ( IP yang terhubung dengan debian )
dan login menggunakan:
Nama Pengguna: daffa ( user yang tadi telah dibuat tadi user ‘daffa’ )
Kata Sandi: 123 ( kata sandi yang telah dibuat tadi identified by ‘123’; )
NAMA : Hafizhsyah Daffa L S

KELAS : XI-TKJ 1

NO.ABSN : 29

HASIL PRAKTIKUM

1. HASIL PRAKTIKUM

2. PERMASALAHAN PADA PRAKTIKUM

Tidak ada

3. TROUBLESHOOTING

Tidak ada

You might also like