Cara Install MariaDB di FreeBSD
Sebelumnya telah dibahas mengenai cara install Apache dan PHP di FreeBSD. Sekarang kita lanjutkan dengan melakukan install database MariaDB.
Di FreeBSD 11.1 yang saya gunakan ini terdapat 4 versi MariaDB yaitu versi 5.5, 10.0, 10.1 dan 10.2. Yang akan digunakan MariaDB 10.2.
Mencari pkg cache mariadb
1 2 3 4 5 6 7 8 9 | # pkg search mariadb mariadb100-client-10.0.33 Multithreaded SQL database (client) mariadb100-server-10.0.33 Multithreaded SQL database (server) mariadb101-client-10.1.28 Multithreaded SQL database (client) mariadb101-server-10.1.28 Multithreaded SQL database (server) mariadb102-client-10.2.10 Multithreaded SQL database (client) mariadb102-server-10.2.10 Multithreaded SQL database (server) mariadb55-client-5.5.58 Multithreaded SQL database (client) mariadb55-server-5.5.58 Multithreaded SQL database (server) |
Install mariadb102
1 | # pkg install mariadb102-server mariadb102-client |
Aktifkan service mysql dan konfigurasi agar hanya bisa diakses dari localhost
1 2 3 | # sysrc mysql_enable="yes" # sysrc mysql_args="--bind-address=127.0.0.1" # service mysql-server start |
Amankan instalasi MariaDB
1 2 3 4 5 6 7 | # mysql_secure_installation Enter current password for root (enter for none): enter Set root password? [Y/n] y Remove anonymous users? [Y/n] y Disallow root login remotely? [Y/n] y Remove test database and access to it? [Y/n] y Reload privilege tables now? [Y/n] y |
Uji hasil instalasi dan konfigurasi MariaDB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 8 Server version: 10.2.10-MariaDB FreeBSD Ports Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | +--------------------+ 3 rows in set (0.00 sec) MariaDB [(none)]> |
selamat mencoba 🙂
pak saya nemuin kendala lagi sekarang di mysql.. ini saya mau koneksikan webserver nginx sama mysql maria db di beda komputer.. saya cari file my.cnf untuk setting ip server nginx nya.. dari kemarin saya cari di /usr/local/etc/ ndak ada.. saya sudah browsing kesana kemari belum nemu juga. mohon solusinya pak. terimakasih
saya belum pernah coba config remote access mariadb di freebsd.
coba cek folder /usr/local/share/mysql/, isi contoh default config.
buat baru file /usr/local/etc/my.cnf.
siap pak, terima kasih ilmu siap eksekusi