Installing MariaDB (MySQL) on CentOS 7

Install MariaDB in just a few minutes on a CentOS 7 system by following this guide!

Installing MariaDB on CentOS 7 is a quick and easy process.  Follow this guide and it will be done in under five minutes.

Instructions

  1. First, let's install the server and client:
    yum install -y mariadb mariadb-server
  2. Second, enable the service to start at boot and start it manually now:
    systemctl enable mariadb
    systemctl start mariadb
  3. Look at that – MariaDB is installed already! Onto the configuration. Run this as root.
    mysql_secure_installation

    The script will ask you for the current password (which is none so hit Enter). The script will then have you set the new root password, remove anonymous users (if you want), disallow root login remotely (if you want), remove the test database (if you want), and lastly, to reload privileges (which you must do).

  4. After the script exits, you should be able to connect:
    mysql -u root -p
     
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 11
    Server version: 5.5.52-MariaDB MariaDB Server
     
    Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
     
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
     
    MariaDB [(none)]>

Share Tweet Send
0 Comments
Loading...
You've successfully subscribed to Tyler Wright
Great! Next, complete checkout for full access to Tyler Wright
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.