Install MySQL and phpMyAdmin for the MU Online server website
Complete guide to installing MySQL and phpMyAdmin for a MU Online server website: the critical difference between MySQL (for the website) and SQL Server (for the game), when to install MySQL separately vs using XAMPP or AppServ, the full MySQL Community Server installation walkthrough (7 steps including the authentication method choice for PHP compatibility), how to install phpMyAdmin manually and configure config.inc.php, how to create the website database and import the web system's SQL file, how to create a dedicated MySQL user (never use root in the site config), common MySQL connection errors and how to fix them, and security best practices (no port 3306 exposed, strong root password, dedicated user).
MySQL is the database that many MU Online website systems use for the site itself — news, web sessions, and configurations. This guide covers the dedicated installation when you need MySQL as a standalone service.
MySQL is the database that many MU Online website systems use for the site itself — news, web sessions, and configurations. This guide covers the dedicated installation when you need MySQL as a standalone service.
MySQL vs SQL Server — understanding both
THE TWO DATABASES IN A MU ONLINE SERVER:
SQL SERVER (Microsoft) — for the GAME:
→ MuServer, GameServer, DataServer, JoinServer, ConnectServer all connect here
→ Stores: player accounts, characters, items, Zen, guilds, kills, quests
→ Port: 1433 (TCP)
→ Connection: the MuServer components connect via ODBC DSN on the game VPS
MYSQL — for the WEBSITE:
→ The PHP web system connects here for site-specific data
→ Stores: site news, web sessions, vote bonus records, optional web-side features
→ Port: 3306 (TCP)
→ Connection: PHP connects via PDO_MySQL or MySQLi extension
CAN THEY COEXIST?
→ Yes, completely. Having SQL Server (port 1433) and MySQL (port 3306) on the same
server is normal and there's no conflict.
→ Some web systems bypass MySQL entirely and connect directly to the game's SQL Server
→ Check your specific web system's documentation
DO YOU ALWAYS NEED MYSQL?
→ No. If your web system connects directly to SQL Server: MySQL is not needed at all
→ If your web system's readme or install guide mentions MySQL: install it
→ If it's bundled with XAMPP or AppServ: already available, don't install separately
Installing MySQL Community Server
STEP-BY-STEP MYSQL INSTALLATION:
STEP 1 — DOWNLOAD:
→ Search "MySQL Community Server download" → dev.mysql.com/downloads/
→ Choose: Windows (x86, 64-bit), MSI Installer (the larger file = offline installer)
STEP 2 — RUN AS ADMINISTRATOR:
→ Right-click the .msi → "Run as administrator"
STEP 3 — SETUP TYPE:
→ Choose "Server only" (installs just the MySQL server, no development tools)
→ Or "Developer Default" if you also want connectors and tools
STEP 4 — PRODUCT CONFIGURATION:
→ Config Type: "Server Computer" (for a VPS) or "Development Computer" (for local PC)
→ Port: 3306 (keep default)
→ "Open Windows Firewall ports": check this box if you want LAN access
STEP 5 — AUTHENTICATION METHOD (CRITICAL FOR PHP COMPATIBILITY):
→ Two options:
○ "Use Strong Password Encryption (RECOMMENDED)" = caching_sha2_password (MySQL 8 default)
→ More secure, but requires PHP 7.4+ with modern MySQLi/PDO drivers
→ Use this for modern MU web systems
○ "Use Legacy Authentication Method" = mysql_native_password
→ Compatible with all PHP versions including 5.6, 7.0, 7.2
→ Use this for older MU web systems or if you're unsure
→ IF IN DOUBT: choose "Use Legacy Authentication Method" for maximum compatibility
STEP 6 — ACCOUNTS AND ROLES:
→ MySQL Root Password: type a STRONG password (minimum 12 characters)
→ WRITE THIS DOWN — you need it for phpMyAdmin and creating site users
→ Optionally add a non-root user now (or do it later in phpMyAdmin)
STEP 7 — WINDOWS SERVICE:
→ Service Name: MySQL80 (or similar — the default is fine)
→ ☑ Start the MySQL Server at System Startup
→ ☑ Run Windows Service as: Standard System Account
STEP 8 — APPLY CONFIGURATION:
→ Click "Execute" → green checkmarks appear for each step
→ Click "Finish" → MySQL is installed and running
Installing phpMyAdmin
PHPMYADMIN INSTALLATION:
phpMyAdmin is a web-based GUI for managing MySQL. It's NOT included with MySQL Community Server.
PREREQUISITES:
→ A running web server (Apache + PHP) — either XAMPP, AppServ, or standalone Apache/PHP
→ MySQL already installed and running
STEP 1 — DOWNLOAD:
→ phpmyadmin.net → "Download" → phpMyAdmin-X.X.X-all-languages.zip
STEP 2 — EXTRACT:
→ Extract to your web server's root:
→ XAMPP: C:\xampp\htdocs\phpmyadmin\
→ AppServ: C:\AppServ\www\phpMyAdmin\
→ Standalone Apache: C:\Apache24\htdocs\phpmyadmin\
STEP 3 — CREATE CONFIG FILE:
→ In the phpmyadmin folder: copy "config.sample.inc.php" → rename to "config.inc.php"
→ Open config.inc.php in Notepad++
STEP 4 — EDIT CONFIG:
→ Find: $cfg['blowfish_secret'] = '';
→ Change to: $cfg['blowfish_secret'] = 'RandomStringOf32OrMoreCharactersHere!2024';
(generate a random 32+ character string — used for cookie encryption)
→ The server config section should look like:
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
STEP 5 — ACCESS:
→ Browse to: http://localhost/phpmyadmin/
→ Username: root | Password: the MySQL root password you set
→ If you see the phpMyAdmin dashboard: it's working
Creating the website database
SET UP THE MU WEBSITE DATABASE IN PHPMYADMIN:
STEP 1 — CREATE THE DATABASE:
1. In phpMyAdmin: click "New" in the left panel
2. Database name: musite (or whatever your web system expects)
3. Collation: utf8mb4_general_ci
4. Click "Create"
STEP 2 — IMPORT THE SCHEMA:
1. Click on "musite" in the left panel
2. Click "Import" tab at the top
3. Click "Choose File" → select the .sql file from your web system's installation package
4. Scroll down → click "Go"
5. Tables should now appear in the left panel under "musite"
STEP 3 — CREATE A DEDICATED USER (never use root in site config):
1. phpMyAdmin → "User accounts" → "Add user account"
2. User name: mu_web
3. Host name: localhost
4. Password: type a strong password (different from root)
5. Under "Database for user account": ☑ "Grant all privileges on database musite"
6. Click "Go"
STEP 4 — USE IN SITE CONFIG:
// In your web system's config.php:
$mysql_host = 'localhost';
$mysql_user = 'mu_web'; // dedicated user, not root
$mysql_pass = 'YourPassword';
$mysql_db = 'musite';
$mysql_port = 3306;
Security practices
MYSQL SECURITY CHECKLIST:
1. STRONG ROOT PASSWORD:
→ Must have uppercase, numbers, symbols — minimum 16 characters
→ Change if you used a weak password during install:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewStrongPassword!2024';
2. NEVER USE ROOT IN THE SITE CONFIG FILE:
→ Create dedicated users per database
→ If config.php is ever exposed, the attacker only accesses one database
3. DO NOT EXPOSE PORT 3306 TO THE INTERNET:
→ MySQL should only be accessible from localhost (same machine)
→ Block in Windows Firewall: deny inbound TCP port 3306 from all except localhost
4. ROOT SHOULD ONLY CONNECT FROM LOCALHOST:
→ Default is root@localhost — never change this to root@'%' (all hosts)
→ If you need remote database access: create a specific user for that IP only
GRANT ALL ON musite.* TO 'user'@'203.0.113.1' IDENTIFIED BY 'password';
5. RESTRICT PHPMYADMIN ACCESS:
→ phpMyAdmin should not be publicly accessible to the internet on production
→ Add .htaccess in the phpmyadmin folder:
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
→ This allows access only from localhost (your own machine via RDP)
Continue with the website hosting tutorial (for the complete picture of connecting the site to both MySQL and SQL Server), the AppServ tutorial (if you prefer the all-in-one solution), and the XAMPP tutorial (for an alternative all-in-one with more current PHP/MySQL versions).
Frequently asked questions
Does MySQL replace the game's SQL Server?
No, they serve different purposes. The game (MuServer, GameServer, DataServer) uses Microsoft SQL Server to store game data: player accounts, characters, items, guilds, and events. MySQL is used by many MU Online website systems for the site's own data: site configurations, web sessions, news. They can both run on the same server without conflict (SQL Server on port 1433, MySQL on port 3306). Some web systems connect directly to SQL Server without needing MySQL at all — check your web system's requirements.
Do I need MySQL if I use XAMPP or AppServ?
No. Both XAMPP and AppServ include MySQL in their installation. If you're using either of those, MySQL is already available and running. Install MySQL separately only when you want MySQL as a standalone Windows service without the full XAMPP/AppServ stack.
Which MySQL version should I install?
MySQL 8.x is the current version with strong security. MySQL 5.7 is the older LTS version. The main compatibility issue with MySQL 8: it changed the default authentication plugin to caching_sha2_password. Some older PHP versions and MU web systems only support mysql_native_password (the MySQL 5.7 method). If your web system fails to connect with MySQL 8: in MySQL 8, run ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; to switch that user to the compatible method.
phpMyAdmin says 'The mysqli extension is missing' — what does that do?
This means PHP doesn't have the mysqli extension enabled. In php.ini, find the line ;extension=mysqli and remove the semicolon (;) to enable it. Then restart Apache. phpMyAdmin requires mysqli (or PDO_MySQL) to communicate with MySQL.