Configuring the database server

Database server security configuration

The mysql_secure_installation command will guide you through the process of setting a root password and removing unsafe features from your installation.

  1. Start the MariaDB server.
sudo systemctl start mariadb

create vpc for linux instance

  1. Run mysql_secure_installation
sudo mysql_secure_installation
  • By default, the root account is not password set. Press Enter.

  • Enter Y to set password and enter password. Example here using password 123Admin

create vpc for linux instance

You must write down the root password to use the Database configuration for Nodejs app

Setting a root password for MariaDB is just the most basic measure to secure your database. When you build or install a database-driven application, you typically create a database service user for that application and avoid using the root account for anything but database administration. data.

In addition, you should note the following:

  • Enter Y to remove anonymous user accounts.

  • Enter Y to disable remote root login.

  • Enter Y to remove the test database.

  • Type Y to reload privilege tables and save your changes.

create vpc for linux instance

  1. Complete security configuration for the database server

create vpc for linux instance

  1. If you want the MariaDB server to start every boot, enter the following command:
sudo systemctl enable mariadb

create vpc for linux instance