What you will get by the end of this guide
phpMyAdmin is the most popular web-based tool for managing MySQL and MariaDB databases. Instead of typing SQL commands into a black terminal window, you get a clean browser interface where you can create databases, add tables, import and export data, and run queries with a few clicks.
By the end of this tutorial you will have XAMPP installed on Windows 11, the built-in phpMyAdmin working at http://localhost/phpmyadmin, your first login completed, the default empty root password secured, and your first database and table created. If you are a PHP developer, a student, or anyone who needs a local database server on Windows, this is the setup you want.
Prerequisites
- A PC running Windows 11 (64-bit). These steps also work on Windows 10.
- Administrator rights on the machine (the installer needs them).
- An internet connection to download XAMPP.
- No other program already listening on port 80 or 443 (Skype, another Apache install, or IIS can block it — we cover the fix below).
Step 1: Download XAMPP for Windows
XAMPP is a free package that bundles Apache, MariaDB (the MySQL-compatible database), PHP, and phpMyAdmin into one installer. Go to the official Apache Friends download page and grab the latest XAMPP for Windows build with PHP 8.x. As of this writing the current installers ship PHP 8.2/8.3 with MariaDB 10.4+ — always prefer the newest stable build.
Save the installer (a file like xampp-windows-x64-8.3.x-x-VS16-installer.exe) somewhere you can find it, then double-click it. If Windows shows a User Account Control warning about installing to C:\Program Files, that is the reason we install to C:\xampp instead — XAMPP's own installer suggests this default and it avoids permission headaches later.
Step 2: Run the installer and choose components
Click through the setup wizard. On the "Select Components" screen you can leave everything checked, or slim it down to the essentials for this tutorial:
- Server: Apache, MySQL
- Program Languages: PHP
- Program: phpMyAdmin
On the folder screen, accept the default C:\xampp. Finish the wizard — the install takes a couple of minutes. When it asks about allowing access through the Windows Firewall, approve it so Apache can serve pages on your local network if you ever need that.
Step 3: Start Apache and MySQL in the XAMPP Control Panel
Open the XAMPP Control Panel (search "XAMPP" in the Start menu). You will see a list of modules. Click Start next to Apache and next to MySQL. Both rows should turn green with a running process ID.
The MySQL row in XAMPP actually starts MariaDB, which speaks the MySQL protocol — for phpMyAdmin purposes they are interchangeable, and everything in this guide works the same either way.
Step 4: Open phpMyAdmin and log in for the first time
With both services green, open your browser and go to:
http://localhost/phpmyadmin
You will see the phpMyAdmin login screen. On a fresh XAMPP install, log in with:
- Username:
root - Password: leave it empty
Click Go. You are now looking at the phpMyAdmin dashboard: the left panel lists databases, the center shows the server overview (server type, version, protocol). Congratulations — phpMyAdmin is working.
Step 5: Secure the root account (do this now)
Logging in as root with no password is fine for five minutes of testing and dangerous forever after. In phpMyAdmin, click the User accounts tab at the top, then click Edit privileges next to the root user for localhost.
On the edit page, find the Change password section, type a strong password twice, and click Go. phpMyAdmin will log you out. Log back in with username root and your new password.
Important: XAMPP's phpMyAdmin logs in with a config file (C:\xampp\phpMyAdmin\config.inc.php), and older XAMPP versions used "config" auth that stored the password there. If phpMyAdmin stops letting you in after the password change, open that file and update the password line:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
Setting auth_type to cookie makes phpMyAdmin show the login form instead of reading a stored password — this is the secure, recommended setting for a local dev machine.
Step 6: Create your first database
In the left panel, click New. Name the database (lowercase, no spaces — e.g. my_first_db), choose the collation utf8mb4_general_ci so it stores every language and emoji correctly, and click Create.
utf8mb4 is the correct modern choice: the older utf8 collation in MySQL is an incomplete 3-byte implementation that silently mangles emoji. Always pick utf8mb4 for new databases.
Step 7: Create your first table
Click your new database in the left panel, then the Structure tab. In the "Create table" box, name it users, set the number of columns to 4, and click Go. Fill in the columns:
id— INT, check A_I (auto-increment), set as Primary keyname— VARCHAR, length 100email— VARCHAR, length 150created_at— TIMESTAMP, defaultCURRENT_TIMESTAMP
Click Save. phpMyAdmin shows you the exact CREATE TABLE SQL it ran — a great way to learn SQL by watching what the GUI generates.
Step 8: Add and view data
Click the users table, then the Insert tab. Fill in a name and email, leave id and created_at alone (auto-increment and the default handle them), and click Go. Now click the Browse tab — your row is there, with the ID filled in automatically.
Try the SQL tab and run:
SELECT * FROM users;
You have just run your first query through phpMyAdmin. The result grid appears below the query box.
Step 9: Back up your database (export)
Click your database, then the Export tab. Leave the method on Quick and the format on SQL, then click Export. Your browser downloads a .sql file containing every table definition and row — that is your backup.
To restore it later: create an empty database, open its Import tab, choose the .sql file, and click Go. Export/Import is also how you move a local database to a live server.
Verify it worked
Run through this checklist before calling it done:
- Apache and MySQL both show green Running in the XAMPP Control Panel.
http://localhost/phpmyadminopens the phpMyAdmin dashboard in your browser.- You can log in as
rootwith the password you set (and an empty password no longer works). - Your
my_first_dbdatabase exists with auserstable containing at least one row. - An export of the database downloads a valid
.sqlfile.
You can also sanity-check the database server from a terminal with the bundled MySQL client:
C:\xampp\mysql\bin\mysql.exe -u root -p -e "SHOW DATABASES;"
Type your root password when prompted. If the database list prints, the server is healthy independently of phpMyAdmin.
Common issues and fixes
Apache won't start: "Port 80 in use"
Something else is already listening on port 80 — commonly Skype, IIS, or a previous Apache install. In the XAMPP Control Panel, click Netstat to see which process owns port 80. Either stop that program (for Skype: Settings → Advanced → Connection → uncheck "use port 80 and 443"), or change Apache's port: click Apache's Config → httpd.conf, change Listen 80 to Listen 8080 and the ServerName localhost:80 line to match, then access everything via http://localhost:8080/phpmyadmin.
MySQL shuts down unexpectedly right after starting
This is almost always a leftover lock from a crashed session. Stop MySQL, delete C:\xampp\mysql\data\ibdata1 is not the fix on a database you care about — instead, check the error log at C:\xampp\mysql\data\mysql_error.log. On a fresh install, the usual culprit is another MySQL/MariaDB service already running: open Windows Services (services.msc), look for a MySQL service, stop and disable it, then start MySQL from XAMPP again.
"Access denied for user 'root'@'localhost'" after setting a password
You changed the password inside the database but phpMyAdmin is still trying the old (empty) one via its config. Open C:\xampp\phpMyAdmin\config.inc.php, make sure auth_type is cookie (login form), and that there is no stale $cfg['Servers'][$i]['password'] line overriding the form. Restart Apache from the control panel and log in again.
phpMyAdmin shows a blank page or "Cannot load" errors
Restart both Apache and MySQL from the control panel — order matters: MySQL first, then Apache. If the page still fails, check C:\xampp\apache\logs\error.log for PHP fatal errors; on very fresh installs this is usually fixed by a clean reinstall to C:\xampp (never C:\Program Files, where UAC blocks file writes).
phpMyAdmin warns "The phpMyAdmin configuration storage is not completely configured"
This is a harmless notice about advanced features (bookmarking, history, designer). You can ignore it, or silence it permanently: open the Operations tab of any database and click "Create" under "Create phpMyAdmin configuration storage". It creates a phpmyadmin database with the extra tables and the warning disappears.
Conclusion
You now have a complete local database workstation on Windows 11: XAMPP running Apache and MariaDB, phpMyAdmin secured with a real root password, and hands-on experience creating databases, tables, rows, and backups. From here, point your PHP projects at localhost with the root credentials you set, and manage everything through http://localhost/phpmyadmin.
Setting up dev environments, staging servers, and production databases is exactly what we do every day — if you would rather have an expert handle your server setup, XpertBees can get your stack running correctly the first time.



