Skip to content
WampServer logo WampServer
  • Home
  • What is
  • Features
  • Install
  • Compare
  • FAQs
  • Guide
Get WampServer

How to Create a Database in phpMyAdmin (WampServer)

create a database in phpMyAdmin WampServer

WampServer projects such as WordPress sites, Laravel apps, and database-driven PHP applications need a database to store their data. If you use WampServer on Windows, that database lives in MySQL or MariaDB, and phpMyAdmin is the visual tool you use to create and manage it. This guide walks you through the full process, from opening phpMyAdmin to connecting your project with the right credentials.

If you have not set up your local stack yet, start with our guide to download and install WampServer on Windows so Apache, PHP, and MySQL are running correctly. Once the tray icon is green, you are ready to follow the steps below, and the same database you create here is exactly what you will use when you install WordPress on WampServer.

What Is phpMyAdmin in WampServer?

phpMyAdmin is a free, browser-based administration tool for MySQL and MariaDB databases. WampServer bundles it by default, so you do not need to install anything extra. Instead of typing SQL commands into a black console window, you click buttons to create databases, add tables, import files, export backups, and manage user accounts.

For local development, phpMyAdmin makes database creation fast and visual, lets you inspect tables while you debug, and gives you import and export tools for backups and migrations.

Before You Create a Database in phpMyAdmin

Step 1: Start WampServer and Check the Tray Icon

Double-click the WampServer shortcut. Left-click the tray icon near the clock and choose Start All Services. Wait until the icon turns green, meaning Apache and the database service are running. If it stays orange or red, phpMyAdmin will not load properly until you fix that.

Step 2: Confirm Your Project Type

Use lowercase letters, numbers, and underscores only, for example my_shop_db or portfolio_wp. Avoid spaces, hyphens, and capitals, which can cause connection issues in some PHP applications.

How to Open phpMyAdmin in WampServer

On Windows 10 and 11, left-click the tray icon, hover over phpMyAdmin, and click it, or type http://localhost/phpmyadmin/ in your browser.

By default, the username is root and the password is blank on a fresh installation. Enter root, leave the password empty, and click Go. Leave the system databases in the left sidebar, such as information_schema and mysql, alone; never delete or edit them.

How to Create a Database in phpMyAdmin: Step-by-Step

Step 1: Click the Databases Tab

At the top of the dashboard, click the Databases tab, which lists every database and shows a Create database form.

Step 2: Enter a Database Name

Type your chosen name into the field. Use one database per project, so backups, restores, and deletions stay clean and isolated.

Step 3: Choose the Collation

Next to the name field, select utf8mb4_general_ci or utf8mb4_unicode_ci. The utf8mb4 set supports the full range of characters, including emoji, and works best for WordPress and modern PHP frameworks.

Step 4: Click Create

Click Create. phpMyAdmin creates the empty database and opens its structure page, and the new name appears in the left sidebar. Empty is normal; your application installer will create the tables it needs automatically.

How to Create a Database User in phpMyAdmin

Using root for every project works locally, but a dedicated user per project is better practice. It mirrors live hosting and protects your other databases if one project has a bug.

  1. Click the User accounts tab at the top of phpMyAdmin.
  2. Click Add user account below the list of existing users.
  3. Enter a username, for example my_shop_user.
  4. Set the host name field to Local and localhost.
  5. Enter a strong password, or click Generate to create one, and save it somewhere safe.
  6. Leave the global privileges section unchecked for now.
  7. Click Go at the bottom to create the user.

Next, give that user access only to your new database:

  1. In User accounts, click Edit privileges for the new user.
  2. Open the Database tab inside the privileges screen.
  3. Select your database from the list and click Go.
  4. Click Check all to grant all privileges on that one database.
  5. Click Go to save.

Your project now has three values it needs: the database name, the username, and the password, plus the host, which is localhost on WampServer.

Database Connection Details for WampServer Projects

When an installer or configuration file asks for database details, use the values in this table for a standard local setup.

SettingTypical Value
Database nameThe name you created, for example my_shop_db
Usernameroot or your dedicated user
PasswordBlank for default root, or your user password
Database hostlocalhost
Table prefixSet by the app, for example wp_ for WordPress

In WordPress wp-config.php, these appear as DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST. In Laravel .env, they appear as DB_DATABASE, DB_USERNAME, and DB_PASSWORD, with DB_HOST usually 127.0.0.1. If a connection fails, compare each value character by character; a wrong name or extra space is the usual cause.

Common phpMyAdmin Database Errors and Fixes

Error: phpMyAdmin Shows a Blank Page or Connection Error

This usually means the database service is not running. Restart all services from the tray icon, confirm the icon is green, then reload the page.

Error: Access Denied for User Root

If you changed the root password earlier, a blank password will fail. Log in with the correct password. Do not reinstall WampServer first; the cause is almost always a credential mismatch.

Error: Database Already Exists

You cannot create two databases with the same name. Use the existing one if it belongs to the same project, or choose a different name. Never drop a database until you confirm it holds no data you need.

For background on how the underlying web server fits into this stack, the overview of the Apache HTTP Server explains the role Apache plays alongside PHP and MySQL in a setup like WampServer.

FAQ

Do I need to create tables after creating a database in phpMyAdmin?

No, not for most projects. WordPress, Laravel, and other frameworks create their own tables during installation or migration. You only create tables manually when you build a custom PHP application without an installer.

What is the default phpMyAdmin username and password in WampServer?

The default username is root and the password is blank on a fresh installation. Change it later if you want better local security habits, and note any new password down safely.

Can I create more than one database in WampServer?

Yes. You can create as many databases as your disk space allows. Use one database per project so backups, testing, and cleanup stay simple and safe.

What collation should I choose for a WordPress database?

Choose utf8mb4_general_ci or utf8mb4_unicode_ci. Both support modern character sets fully, including emoji and special symbols used in posts and comments.

Conclusion

Creating a database in phpMyAdmin with WampServer takes only a few clicks once the services are green: open phpMyAdmin, name your database, pick utf8mb4 collation, and create a dedicated user with privileges on that database only. Keep your connection details accurate, use one database per project, and your local WordPress, Laravel, or custom PHP site will connect cleanly every time you start work.

WampServer

WampServer simplifies local web development on Windows with essential resources for downloading, installation, configuration, server management, and troubleshooting to ensure a smooth development experience.

Navigation

  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions
  • Sitemap

© 2026 | WampServer | All Right Reserved

Disclaimer: Not affiliated with WampServer or any other third-party platforms