How to Create and Restore MySQL Database in XAMPP on Windows
This guide shows how to create a MySQL database and restore a backup using XAMPP on Windows with phpMyAdmin.
1. Start XAMPP Services
Open XAMPP Control Panel and click Start for
Apache
andMySQL
.2. Open phpMyAdmin
In your browser, go to:
http://localhost/phpmyadmin
This opens the MySQL management interface.
3. Create a New Database
Click on Databases in the top menu.
Enter a name for your database (e.g.
mydb
), chooseutf8_general_ci
collation, and click Create.4. Restore a Backup Database
To import a backup into your new database:
- Click the database name in the left sidebar.
- Go to the Import tab.
- Click Choose File and select your backup file (e.g.
backup.sql
). - Click Go to import.
phpMyAdmin will restore the tables and data into your database.
5. Verify Database Restore
After import, check the left sidebar for tables.
If everything is successful, your MySQL database is ready for use with XAMPP.
🎉 You now know how to create and restore a MySQL database with XAMPP on Windows using phpMyAdmin. Perfect for local WordPress or PHP projects!