Maria DB – Installation & Initial Configuration

Below are the steps to install Maria DB on CentOS 7.

  1. Check Maria DB using yum.
    Maria DB works on Port 3306. So check activity on port 3306. If there is no activity on Port 3306 then you need to check Maria DB Software as below.

    # lsof -i :3306
    # yum list | grep mariadb
    mariadb.x86_64 1:5.5.60-1.el7_5 base
    mariadb-server.x86_64 1:5.5.60-1.el7_5 base
  2. Install Maria DB.
    # yum install mariadb-server mariadb -y
  3. Make sure that it should start at boot time.
    # systemctl enable mariadb
  4. Start Maria DB.
    # systemctl start mariadb
    # lsof -i :3306
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    mysqld 2290 mysql 13u IPv4 28819 0t0 TCP *:mysql (LISTEN)
  5. Set root (Administrator’s Password.)
    # mysqladmin password 'Pass123456'
  6. Now try to connect using this password as below.
    # mysql -h localhost -u root -p
    Enter password:
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 3
    Server version: 5.5.60-MariaDB MariaDB Server
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    MariaDB [(none)]>

    That’s All. You have successfully installed MariaDB.