How to Install MySQL 8 on openSUSE Leap 15.0 (Legacy)
Legacy instructions for MySQL 8.0 on openSUSE Leap 15.0. Leap 15.0 and MySQL 8.0 are end of life; use only to maintain an existing system.
On this page
This guide preserves the original MySQL 8.0 installation steps for an existing openSUSE Leap 15.0 host. It uses the community OBS server:database:mysql repository, not the default openSUSE repositories or the current Oracle MySQL repository.
Support status: openSUSE Leap 15.0 is end of life and listed in the openSUSE documentation archive. MySQL 8.0 reached end of life in April 2026. Do not use this combination for a new production deployment. For an existing database, follow the MySQL 8.0 to 8.4 upgrade guide and verify target platform support. For new installations, choose an operating system and MySQL series in the current MySQL supported-platform matrix; SQLiz has current guides for MySQL 9.7 LTS on Debian 13 and Ubuntu 26.04. See the MySQL 8.0 release notes for its lifecycle.
Prerequisites
Before you install MySQL, you need:
- openSUSE Leap 15.0 only (legacy; no longer security supported)
- Non-root user with sudo privileges
- Internet connection
Step 1 - Add the Legacy MySQL 8.0 Repository
First add the MySQL 8.0 community repository:
sudo zypper addrepo https://download.opensuse.org/repositories/server:/database:/mysql/openSUSE_Leap_15.0/server:database:mysql.repo
This URL targets the old Leap 15.0 repository. It may no longer be available; do not substitute it for a repository intended for a newer openSUSE release.
Step 2 - Install MySQL
Now install MySQL with:
sudo zypper install mysql-community-server
This will install MySQL 8.0 on openSUSE.
Step 3 - Start MySQL Service
Start the MySQL service:
sudo systemctl start mysql
Step 4 - Secure the MySQL Installation
Run the mysql_secure_installation script:
sudo mysql_secure_installation
This will set root password, remove anonymous users etc.
Step 5 - Create MySQL User
Create a dedicated MySQL user for your apps:
-- Run as an administrator before logging in with the application account.
CREATE DATABASE IF NOT EXISTS mytestdb;
-- MySQL 8.0.18+ returns a generated password; save it securely for the connection test.
CREATE USER 'myuser'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
-- CREATE is included for the sample table; use a separate migration account for schema changes in production.
GRANT CREATE, SELECT, INSERT, UPDATE, DELETE ON mytestdb.* TO 'myuser'@'localhost';
Step 6 - Test MySQL
Connect to MySQL shell:
mysql -u myuser -p
SHOW DATABASES;
Step 7 - Create a Sample Table
Create a table in the sample database:
USE mytestdb;
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50),
email VARCHAR(50)
);
The legacy MySQL 8.0 installation steps are complete. Do not expose this unsupported operating-system and database combination to a new production workload.
Conclusion
This page is for maintaining an existing Leap 15.0 system only. For new deployments, choose a currently supported operating system and MySQL release from the supported-platform matrix.
If you want to learn more about MySQL, please use our MySQL tutorials and MySQL Reference.