Installing and Configuring MySQL 8.0 on Kylin Linux V10

Kylin Linux V10 operates on a Linux kernel, making it largely compatible with CentOS and RHEL operational procedures. However, identifying the specific system version requires specific commands, as standard release files may not provide complete kernel details.

To determine the appropriate MySQL package, examine the kernel version using the following methods:

# Check detailed OS information
[root@kylin-server ~]# hostnamectl
   Static hostname: kylin-server
   Operating System: Kylin Linux Advanced Server V10 (Tercel)
   Kernel: Linux 4.19.90-23.8.v2101.ky10.x86_64
   Architecture: x86-64

# Verify kernel build details
[root@kylin-server ~]# cat /proc/version
Linux version 4.19.90-23.8.v2101.ky10.x86_64 (gcc version 7.3.0 (GCC))

The output confirms the system runs kernel version 4.19. This aligns with the architecture of RHEL 8 or Oracle Linux 8, indicating that packages designed for these distributions should function correctly on Kylin V10.

Installation Procedure

Based on the kernel analysis, download the RPM bundle corresponding to Red Hat Enterprise Linux 8 / Oracle Linux 8 (x86, 64-bit).

Navigate to the directory containing the downloaded RPM packages and perform a local installation using the package manager. This resolves dependencies automatically:

# Install all RPM packages in the current directory
sudo dnf localinstall *.rpm -y

Service Configuration

Installing via RPM configures the systemd service automatically. By default, the mysqld service runs under the dedictaed mysql user for security purposes.

In specific development or testing scenarios, running the service as root may be desired to simplify file permissions. This requires modifications to both the systemd service unit and the MySQL configuration file.

1. Modifying the Systemd Service Unit

Locate the service file (typically /usr/lib/systemd/system/mysqld.service) and modify the [Service] section to specify the root user. Alternatively, use a systemd override.

[Unit]
Description=MySQL Server
Documentation=man:mysqld(8)
After=network.target

[Service]
User=root
Group=root

[Install]
WantedBy=multi-user.target

After editing the file, reload the systemd daemon to apply changes:

sudo systemctl daemon-reload

2. Updating MySQL Configuration

Open the main configuration file, typically located at /etc/my.cnf, and explicitly set the user variable under the [mysqld] block.

[mysqld]
user=root
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysql/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Once both configurations are updated, start the MySQL service:

sudo systemctl start mysqld
sudo systemctl enable mysqld

Tags: Kylin OS MySQL 8.0 Linux Administration systemd RPM Installation

Posted on Wed, 07 Oct 2026 16:38:16 +0000 by khushbush