# Re:0 - Starting Life in Backend - Day6

seal

1

Extra Level 1: Configure MySQL DB

Download

MySQL Installation Portal

Just a Installer, to install 64 bits MySQL Server.It is very simple to use by double clicking

  1. Choose Custom Installation
  2. Select the service you want to install and click the arrow to add it to the right
  3. Click Advanced Options to change install path
  4. Next and Execute
  5. Configure MySQL Server —— You can change Server Name and the Server Port
  6. Set your password(Root Password), and add some special users
  7. Next to Finish
  8. Add bin path to the system path

After these, you can test by typing mysql in terminal.

Extra Level 2: Configure Nacos

Configure MySQL

Nacos need a loacl database, here we choose MySQL DB;

  1. First, create a database user dedicated to Nacos
    CREATE USER 'nacos'@'localhost' IDENTIFIED BY 'PASSWORD'; (pls remember to add ';' at last)
  2. Next, create database and grant permissions.
    CREATE DATABASE nacos_config DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    GRANT ALL PRIVILEGES ON nacos_config.* TO 'nacos'@'localhost';
    FLUSH PRIVILEGES;(Reload the MySQL server's privilege tables)

Download Nacos Server

Import Nacos DataBase Script

  1. Enter the conf folder in the Nacos decompression directory, and find nacos-mysql.sql.
  2. This is a SQL script files, we need to implement it.
    mysql -u nacos -p nacos_config < F:\Backend\nacos\conf\mysql-schema.sql(must not add password here)
  3. Then we need to open file named application.properties, and modify the MySQL configuration items

Start

startup.cmd -m standalone

Success to Start

1