Deploy MySQL on an Arm-based Linux server
Introduction
Install MySQL with Docker on an Arm-based Linux server
Connect to MySQL and verify the database
Next Steps
Deploy MySQL on an Arm-based Linux server
MySQL installation options
Cloud services such as Amazon Relational Database Service (RDS) handle MySQL installation for you. On a bare-metal or cloud server, you can install MySQL in several ways.
You’ll install MySQL on an Arm-based Linux server using a container image. For other installation approaches, see Chapter 2 Installing MySQL in the MySQL documentation.
Before you begin
You need an Arm-based Linux server with Docker Engine installed and running. For Docker Engine installation instructions, see the Docker Engine install guide .
Check the server architecture:
uname -m
The expected output on a 64-bit Arm server is:
aarch64
Check that the Docker client can reach Docker Engine:
docker info
Start a MySQL container
The official MySQL container image supports arm64. Create a Docker volume to keep the database files when the container is replaced:
docker volume create mysql-data
Start MySQL 8.4. Replace change-me with a strong password of your choice:
docker run -d \
--name mysql-arm \
--restart unless-stopped \
-p 127.0.0.1:3306:3306 \
-v mysql-data:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD='change-me' \
mysql:8.4
Docker selects the arm64 image for the server. The port binding makes MySQL available on the loopback interface of the server. The volume stores the database outside the container.
Check that the container is running:
docker ps --filter name=mysql-arm
MySQL needs time to initialize on its first start. Check the logs and wait until they report that the server is ready for connections:
docker logs mysql-arm
Ensure that the output includes MySQL init process done. Ready for start up.
What you’ve accomplished and what’s next
You’ve used a container image to install MySQL on your Arm-based Linux instance.
Next, you’ll connect to MySQL and create a database in the running container.