Importing CSV file (in Japanese) into MySQL

Operating environment

Introduction

What I want to do:

I would like to manage roster management and receptionist lists with MySQL.

How I will make it done:

I will import / export csv data (with Japanese) somehow to MySQL.
Eventually, with Node - RED or something like that, you can make searching, sorting, writing, exhaling results, etc

1. Excel data preparation:

This time I made an excel file like this:
Since I still have trouble, I'd like to make it all strings.
Even if you input 001 as usual, it will be kindly converted into a number, so let's make it string by entering '001.

① Find my.cnf

Four results were returned.
This is read from the left, but it will be overwritten more and more in the order in which it was read.
So I add the valid ~/.my.cnf to the right.
Note: Because I am addicted to the order of reading my.cnf, so I summarized it

② Replace my.cnf

Rewrite with vim.
Reference: Commonly used Vim command summary

In vim [mysqld] should be as follows. Comment out is acceptable.

[mysqld]
secure-file-priv = ""

③ Reset the Server

Exit with control + D and restart with mysql.server restart.

After reentering the database, I confirmed that it was empty safely with SELECT @@ global.secure_file_priv;

Garbled characters

Apparently it seems to be a character code problem.

■ Solution
Reference: Set character code to utf 8 with mysql
Let character_set_database be utf-8.