
Content ID – Cara Menginstall MariaDB di Centos 7. Untuk menjalankan wordpress kita harus menginstall MySQL. Disini akan dijabarkan bagaimana cara menginstall MariaDB sebagai MySQL server.
1. Install MariaDB dengan perintah berikut:
yum install mariadb-server
[root@db ~]# yum install mariadb-server Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.sfo12.us.leaseweb.net * extras: mirror.sfo12.us.leaseweb.net * updates: mirror.sfo12.us.leaseweb.net Resolving Dependencies --> Running transaction check ---> Package mariadb-server.x86_64 1:5.5.56-2.el7 will be installed --> Processing Dependency: mariadb(x86-64) = 1:5.5.56-2.el7 for package: 1:mariadb-server-5.5.56-2.el7.x86_64 --> Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.56-2.el7.x86_64
2. Star MariaDB yang sudah di install dengan perintah:
systemctl start mariadb
[root@db ~]# systemctl start mariadb [root@db ~]#
3. Cek status dari MariaDB apakah sudah jalan di VPS.
systemctl status mariadb
[root@db ~]# systemctl status mariadb ● mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) Active: active (running) since Mon 2018-06-04 06:12:43 UTC; 24s ago Process: 4038 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS) Process: 3959 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) Main PID: 4037 (mysqld_safe) CGroup: /system.slice/mariadb.service ├─4037 /bin/sh /usr/bin/mysqld_safe --basedir=/usr └─4199 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-
4. Jalankan perintah berikut agar MariaDB berjalan otomatis pada saat booting
systemctl enable mariadb
[root@db ~]# systemctl enable mariadb Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service. [root@db ~]#
5. Jalankan perintah berikut agar MySQL berjalan secara aman dan secure dan ikuti langkah-langkahnya
mysql_secure_installation
[root@db ~]# mysql_secure_installation ..... Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n]
6. MySQL MariDB sudah terinstall di VPS Centos 7.