localhost/phpmyadmin — MySQL Database Manager

Access phpMyAdmin at localhost/phpmyadmin to manage your MySQL databases through a web interface. Create databases, run SQL queries, import/export data, and manage users. Default login: username root, password (blank) for XAMPP/WAMP, or root for MAMP.

Open phpMyAdmin
phpMyAdmin database interface

Default Login Credentials

Server StackUsernamePasswordURL
XAMPP (Windows/Mac/Linux)root(blank - leave empty)localhost/phpmyadmin
WAMP (Windows)root(blank - leave empty)localhost/phpmyadmin
MAMP (Mac)rootrootlocalhost:8888/phpmyadmin
Laragonroot(blank)localhost/phpmyadmin
Linux (apt install)root(MySQL root password)localhost/phpmyadmin
💡 XAMPP/WAMP Tip: Leave the password field completely empty. Don't type "password" or "admin" — just leave it blank and click Go.

How to Access phpMyAdmin

  1. Start servers — Open XAMPP Control Panel, start Apache and MySQL
  2. Open browser — Go to http://localhost/phpmyadmin
  3. Enter credentials — Username: root, Password: (blank or root)
  4. Click "Go" — You're in the phpMyAdmin dashboard

What You Can Do in phpMyAdmin

  • Create Databases — New databases for WordPress, Laravel, etc.
  • Browse Tables — View and edit data directly
  • Run SQL Queries — Execute SELECT, INSERT, UPDATE, DELETE
  • Import Data — Upload .sql files to restore backups
  • Export Data — Download database backups
  • Manage Users — Create MySQL users and set permissions
  • Reset Passwords — Change WordPress admin password in wp_users

phpMyAdmin Not Working? Troubleshooting

#1045 - Access denied for user 'root'@'localhost'

Cause: Wrong password entered.

Fix for XAMPP/WAMP: Leave password field completely empty.

Fix for MAMP: Use root as the password.

Cannot connect: invalid settings

Cause: MySQL server not running.

Fix: Open XAMPP Control Panel and click Start next to MySQL.

404 Not Found

Cause: Apache not running or phpMyAdmin not installed.

Fix:

  1. Start Apache in XAMPP Control Panel
  2. Check that C:\xampp\phpMyAdmin folder exists

Login without password is forbidden

Cause: phpMyAdmin config blocks blank passwords.

Fix: Edit config.inc.php in phpMyAdmin folder:

// Find this line and set to true:
$cfg['Servers'][$i]['AllowNoPassword'] = true;

Set MySQL Root Password

For security, you can set a MySQL root password:

Method 1: Via phpMyAdmin

  1. Login to phpMyAdmin
  2. Click User accounts tab
  3. Click Edit privileges for root@localhost
  4. Click Change password
  5. Enter new password and click Go

Method 2: Command Line

# Open terminal/cmd in XAMPP folder
mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword';
FLUSH PRIVILEGES;

After Setting Password

Update config.inc.php in phpMyAdmin folder:

$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'newpassword';

Create a New Database

  1. Click New in the left sidebar
  2. Enter database name (e.g., "wordpress")
  3. Select utf8mb4_general_ci collation
  4. Click Create

Or via SQL:

CREATE DATABASE wordpress 
CHARACTER SET utf8mb4 
COLLATE utf8mb4_general_ci;

Common SQL Queries

TaskSQL Query
Show all databasesSHOW DATABASES;
Show all tablesSHOW TABLES;
Select all from tableSELECT * FROM tablename;
Reset WP passwordUPDATE wp_users SET user_pass=MD5('newpass') WHERE user_login='admin';
Change WP site URLUPDATE wp_options SET option_value='http://localhost' WHERE option_name='siteurl';

Alternative URLs

StackphpMyAdmin URL
XAMPPlocalhost/phpmyadmin
MAMPlocalhost:8888/phpmyadmin
Custom portlocalhost:8080/phpmyadmin
IP address127.0.0.1/phpmyadmin