Cara Menginstall MariaDB di Centos 7

Posted on
Cara Menginstall MariaDB di Centos 7
Cara Menginstall MariaDB di Centos 7

Content IDCara 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
[[email protected] ~]# yum install mariadb-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * extras:
 * updates:
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
[[email protected] ~]# systemctl start mariadb
[[email protected] ~]#

3. Cek status dari MariaDB apakah sudah jalan di VPS.

systemctl status mariadb
[[email protected] ~]# 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
[[email protected] ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/ to /usr/lib/systemd/system/mariadb.service.
[[email protected] ~]#

5. Jalankan perintah berikut agar MySQL berjalan secara aman dan secure dan ikuti langkah-langkahnya

[[email protected] ~]# 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.

Leave a Reply

Your email address will not be published. Required fields are marked *