-
Notifications
You must be signed in to change notification settings - Fork 0
Installing MySQL
Before omp-MySQL can store anything, you need a MySQL server running somewhere. This page walks you through getting one — with a graphical installer if you've never touched a database before. Pick your operating system below.
Which version? Choose MySQL 8.4 LTS (the stable, long-term-support release) unless you have a reason not to. omp-MySQL needs 5.7 or newer. See MySQL versions.
Each step below is described click-by-click. The official pages linked under each OS show the same screens with pictures if you want to follow along visually.
-
Download the installer. Go to the official page: 👉 https://dev.mysql.com/downloads/installer/ Download "Windows (x86, 32-bit), MSI Installer" (the larger "full" one is fine). You can click "No thanks, just start my download" — no Oracle account needed.
-
Run
mysql-installer-community-*.msi. -
Choose a setup type. Pick "Server only" (you just need the database) or "Developer Default" if you also want the GUI tools (MySQL Workbench). Click Next → Execute to download/install.
-
Type & Networking. Leave Config Type: Development Computer, Port: 3306. Make sure "Open Windows Firewall port for network access" is checked if other machines will connect. Next.
-
Authentication Method. Choose "Use Strong Password Encryption" (this is
caching_sha2_password— the modern default omp-MySQL expects). Next. -
Accounts and Roles. Set a root password (write it down). You can also "Add User" here to create your gamemode user now — or do it later (see Getting started). Next.
-
Windows Service. Leave "Start the MySQL Server at System Startup" ticked so it runs automatically. Next → Execute → Finish.
✅ MySQL is now running on 127.0.0.1:3306. Full official walkthrough with
screenshots: https://dev.mysql.com/doc/refman/8.4/en/windows-installation.html
-
Download the DMG. 👉 https://dev.mysql.com/downloads/mysql/ Pick macOS and the DMG Archive (choose the ARM build for Apple Silicon / M-series, or x86 for Intel). "No thanks, just start my download."
-
Open the
.dmgand run the.pkginstaller. Click through Continue → Agree → Install. -
Set the root password when the installer asks, and choose "Use Strong Password Encryption". Finish.
-
Start/stop it from System Settings → MySQL (a preference pane the installer adds), or it starts automatically.
✅ Running on 127.0.0.1:3306. Official guide:
https://dev.mysql.com/doc/refman/8.4/en/macos-installation.html
Debian / Ubuntu:
sudo apt update
sudo apt install mysql-server # or the official APT repo for a specific version
sudo systemctl enable --now mysql # start on boot + now
sudo mysql_secure_installation # set root password, remove test stuffFedora / RHEL:
sudo dnf install mysql-server
sudo systemctl enable --now mysqld
sudo mysql_secure_installationOfficial APT repo (to choose 8.4 LTS exactly): https://dev.mysql.com/doc/refman/8.4/en/linux-installation-apt-repo.html
If you just want a database to test against and don't want to install anything permanently:
docker run -d --name mysql \
-e MYSQL_ROOT_PASSWORD=rootpw \
-e MYSQL_DATABASE=mydb \
-p 3306:3306 \
mysql:8.4That's a full MySQL 8.4 on 127.0.0.1:3306 in seconds. Stop it with
docker stop mysql, start again with docker start mysql.
Image docs: https://hub.docker.com/_/mysql
MySQL Workbench is a free graphical tool to view tables, run SQL, and manage users — great when you're learning.
- Download: 👉 https://dev.mysql.com/downloads/workbench/
- Install and open it.
- Click the
+next to "MySQL Connections", enter:-
Hostname:
127.0.0.1Port:3306 -
Username:
root(or your user)
-
Hostname:
-
Test Connection, enter the password, OK. Double-click the connection to
open it — now you can see your
accountstable fill up as players register.
Official Workbench docs: https://dev.mysql.com/doc/workbench/en/
Open a terminal (or Workbench) and run:
mysql -u root -p -e "SELECT VERSION();"If it prints a version like 8.4.x, you're ready.
Now create a database user and connect your server: 👉 Getting started (creates the user, sets up TLS, first query)
🔒 Don't use
rootfor your gamemode — make a limited user. The repo shipstools/least-privilege-user.sqlfor exactly this. See Security.
Understand
Use
- Installing MySQL
- Docker Compose
- Getting started
- Configuration
- SQL crash course
- Designing your tables
- Storing game data
- Dates & times
- First queries
- Async patterns
- Reading results
- Prepared statements
- Passwords & hashing
- Transactions
- Models (active-record)
- Tutorial: login system
- mysql-admin demo
Deeper
Reference