Click here for "Error Codes for Commercial Air Conditioners".

Debian10 : DiCE, database migration from Mysql5.x to Mysql8

1. Installing DiCE

Whenever the global IP is changed, which happens when the Internet is disconnected or the router is disconnected and rebooted, you need to access the dynamic DNS to notify the change of global IP. DiCE does that automatically for you.

1. 1 Download and install Dice


②DiCE settings.
The output characters of DiCE are garbled because of EUC.
To convert them to UTF-8, install nkf.

#To run the 32-bit software Dice on a 64-bit OS

③Start DiCE

1. 2 Adding an Event


1. 3 Confirmation of events

1. 4 Automatic execution of Dice

Start the DiCE daemon

Make sure it's running.

Set to start automatically.

If /etc/rc.local is not present
If you want to become systemd and run the program at startup, write a script to register it as a service.
In Debian, if you write /etc/rc.local as root and set up the execution bit, it will be executed automatically by the rc-local service.
Create a new /etc/rc.local
# vi /etc/rc.local
/usr/sbin/ethtool -s eno1 wol g
※ eno1 is the name of your network interface(# Check with ip addr)
# chmod 700 /etc/rc.local

2. Steps to migrate to MySQL 8.0

Old Server  MySQL5.6  Database;test-db  Database User;test-db-user
New Server MySQL8.0

2.1 Backup on new server

2.2 Working on the old server

①Take a dump of the DB you want to migrate

②If the database engine of the old server is MyISAM, you need to convert it to InnoDB with the following command

③Bring the retrieved dump to the new server by rsync or scp.

2.3 Working on the new server

①Create a new database that will be migrated.

MySQL 8.0 does not allow - (hyphen) in the database name, so use _ (underscore)
②Pour the database of the old server into the new server.
③Determine the database user and password, and grant permissions.