Databases 15 min read

MySQL 8.0.46 Lab Setup: Verifying x86_64 Linux Baseline & Directory Layout

This tutorial establishes a verifiable baseline for installing MySQL 8.0.46 on Kylin Linux V11 (x86_64), covering system checks (glibc 2.38, architecture), resource validation (3.3 GiB RAM, 21 GiB disk), port 3307 availability, and a structured directory layout separating downloads, config, data, logs, runtime, and SQL scripts.

Cilantro Loves Linux
Cilantro Loves Linux
Cilantro Loves Linux
MySQL 8.0.46 Lab Setup: Verifying x86_64 Linux Baseline & Directory Layout

1 Establish Experimental Baseline

The article defines a reproducible environment for the MySQL 8.0.46 learning series:

Database: MySQL Community Server 8.0.46

OS: Kylin Linux Advanced Server V11 (Swan25)

CPU Architecture: x86_64 (64-bit Intel/AMD) — explicitly not ARM64 ( aarch64)

Test Server: 192.168.19.201 with passwordless SSH

glibc Version: 2.38 (measured via getconf GNU_LIBC_VERSION)

Installation Method: Official glibc 2.28 generic binary package

Lab Root Directory: /opt/mysql-course-8046 TCP Listen: 127.0.0.1:3307 (non-default port to avoid conflicts)

The author emphasizes that the glibc2.28 tag in the package name indicates the build's library compatibility baseline, not a guarantee that any newer system will work; dependency checks remain mandatory.

2 Connect to the Kylin Server

SSH into the server as root: ssh [email protected] All subsequent Bash commands run inside this SSH session. The article notes that SSH access to the OS is distinct from MySQL authentication; the MySQL root user will be initialized later.

3 Check System Version & Architecture

Run three read-only commands:

cat /etc/os-release
uname -m
getconf GNU_LIBC_VERSION
/etc/os-release

shows PRETTY_NAME and VERSION_ID (Kylin V11). uname -m returns x86_64; if it shows aarch64, the x86_64 package cannot be used. getconf GNU_LIBC_VERSION reports glibc 2.38.

A terminal screenshot (Image 1) confirms the output: Kylin Linux Advanced Server V11 (Swan25), x86_64, glibc 2.38.

4 Verify Operating Identity

Execute id to confirm root privileges ( uid=0(root)). The tutorial uses root only for installation steps (directory creation, dependency installation, system account creation). The MySQL server process will later run under a dedicated mysqlcourse system account. The author distinguishes three identity layers: Linux root, Linux mysqlcourse, and MySQL internal 'root'@'localhost'.

5 Check Resources & Port

5.1 Memory and Disk

Commands:

free -h
df -h / /opt
free -h

shows memory and swap; df -h checks root filesystem and /opt (where the lab directory resides). The test machine reported ~3.3 GiB RAM and 21 GiB free disk (Image 2). The article recommends ~4 GiB RAM and at least 10 GiB free space for the exercises, noting the compressed install package is ~851 MiB and extracted files, data directory, and logs will consume additional space.

5.2 Port 3307 Availability

Command: ss -lnt 'sport = :3307' This lists TCP listeners on port 3307. Only a header line with no records means the port is currently free. The author warns this does not guarantee future availability. If occupied, identify the existing service and either stop it (if safe) or choose another free port and update configuration accordingly.

6 Create Learning Directories

6.1 Directory Responsibilities

A custom layout under /opt/mysql-course-8046 separates concerns:

downloads — official tarball, signature, public key (not the installed program)

conf — my.cnf for this instance (explicitly passed at startup)

data — database files generated by initialization (never manually edited)

logs — error log; temporary initialization password may appear here

run — socket and PID files (runtime artifacts, not configuration)

sql — user-saved practice SQL (separate from internal data files)

Image 3 illustrates this layout. A symbolic link mysql pointing to the extracted program directory will be added in the next article.

6.2 Directory Creation Commands

mkdir -p /opt/mysql-course-8046/{downloads,conf,data,logs,run,sql}
ls -d /opt/mysql-course-8046/{downloads,conf,data,logs,run,sql}
ls -A /opt/mysql-course-8046/data

Brace expansion creates six directories. mkdir -p preserves existing ones. ls -d verifies paths; ls -A confirms data is empty (no hidden files). Image 4 shows the successful creation and verification.

7 Record Connection Conventions

7.1 Address and Socket

Explicit connection parameters avoid default-value confusion:

MySQL TCP Address: 127.0.0.1 MySQL TCP Port: 3307 Unix Socket: /opt/mysql-course-8046/run/mysql.sock (created only after server starts)

Config File: /opt/mysql-course-8046/conf/my.cnf Error Log: /opt/mysql-course-8046/logs/mysql-error.log The socket file must not be manually created; it appears when the server starts.

7.2 No Remote Access Yet

Early articles only use local connections via SSH to the server, then 127.0.0.1:3307 or the local socket. 127.0.0.1 refers to the server's loopback, not a remote machine. Firewall changes, remote root access, and SSH tunnels are deferred.

8 Practice Checklist & Self-Test

8.1 Preparation Checklist

Recorded VERSION_ID, machine architecture, glibc version.

Confirmed which Linux terminal runs installation commands.

Checked memory, disk, and port 3307.

Created six learning directories; data remains empty.

Recorded config, log, and socket paths.

8.2 Self-Test Questions

Why not put the install package in data ? The package is a distribution artifact; data is the server's managed database file location — different responsibilities.

Why can't you keep using port 3306 after setting 3307? The client must connect to the actual listening port; port numbers do not auto-translate.

Why doesn't uname -m prove MySQL is 8.0.46? It reports machine architecture, not the connected database server's software version.

9 Official References

MySQL Generic Binary Installation Guide:

https://dev.mysql.com/doc/refman/8.0/en/binary-installation.html

Kylin V11 Official Product Page: https://www.kylinos.cn/productPc/server/serverMainV11/ MySQL Connection Parameters:

https://dev.mysql.com/doc/refman/8.0/en/connection-options.html

MySQL 8.0.46 Linux Downloads: https://dev.mysql.com/downloads/mysql/8.0.html?os=2 All commands were executed on the actual server; original environment and operation logs are preserved in the accompanying verification directory.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxMySQLdirectory structureglibcx86_64Kylin OSMySQL 8.0.46port 3307
Cilantro Loves Linux
Written by

Cilantro Loves Linux

Focused on Linux system operations and maintenance technology exchange, regularly publishing in-depth technical articles covering core areas such as system architecture, performance optimization, and security hardening. Whether you are a beginner or a seasoned expert, you can find valuable resources to enhance your skills and solve problems here. Follow us to explore the mysteries of Linux operations!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.