localhost/phpmyadmin
phpMyAdmin is a free web-based database management tool for MySQL and MariaDB. Access your local database at localhost/phpmyadmin after installing XAMPP, WAMP, MAMP, or standalone phpMyAdmin on your computer.
How to Access phpMyAdmin on Localhost
- Install XAMPP, WAMP, MAMP, or standalone phpMyAdmin on your system
- Start Apache web server and MySQL database services from control panel
- Open your web browser (Chrome, Firefox, Edge, Safari)
- Type
localhost/phpmyadminin the address bar - Press Enter to access the phpMyAdmin login page
- Enter your database username and password credentials
- Click "Go" to login to phpMyAdmin dashboard
Default phpMyAdmin Login Credentials
Use these default username and password combinations to login to phpMyAdmin:
| Server Software | Username | Password | Notes |
|---|---|---|---|
| XAMPP (Windows/Linux) | root | (blank/empty) | No password by default |
| WAMP (Windows) | root | (blank/empty) | Leave password field empty |
| MAMP (Mac) | root | root | Both username and password are "root" |
| LAMP (Linux) | root | (set during install) | Password set during MySQL installation |
| Custom Installation | (your username) | (your password) | Credentials you configured |
What is phpMyAdmin Used For?
phpMyAdmin is a powerful database administration tool that allows you to:
- Create and manage MySQL and MariaDB databases
- Create, edit, delete, and modify database tables
- Execute SQL queries and commands
- Import databases from SQL files
- Export databases to SQL, CSV, XML formats
- Manage database user accounts and permissions
- Backup and restore database data
- Browse, search, and edit database records
- Optimize and repair database tables
- View database structure and relationships
Alternative phpMyAdmin URLs and Ports
If localhost/phpmyadmin doesn't work, try these alternative URLs:
localhost/phpmyadmin- Default XAMPP/WAMP URLlocalhost:8080/phpmyadmin- Alternative HTTP port 8080localhost/phpMyAdmin- Case-sensitive on Linux systems127.0.0.1/phpmyadmin- Using IP address instead of localhostlocalhost/pma- Custom phpMyAdmin aliaslocalhost:80/phpmyadmin- Explicit port 80localhost/dashboard- XAMPP dashboard with phpMyAdmin link
How to Fix "phpMyAdmin Not Working" Issues
Error: "Cannot connect: invalid settings"
This error means phpMyAdmin cannot connect to your MySQL/MariaDB database server.
- Ensure MySQL or MariaDB service is running in XAMPP/WAMP control panel
- Check database credentials in
config.inc.phpfile are correct - Verify MySQL is listening on port 3306 (default MySQL port)
- Check firewall is not blocking MySQL connections
- Restart both Apache and MySQL services
- Look for MySQL error logs in XAMPP/logs directory
Error: "#1045 - Access denied for user 'root'@'localhost'"
This is a MySQL authentication error indicating wrong username or password.
- Try default credentials: username
rootwith blank password - For MAMP, try username
rootwith passwordroot - Check if you set a custom MySQL root password
- Reset MySQL root password using command line
- Verify user privileges in MySQL database
- Check config.inc.php has correct authentication details
Error: "Access forbidden! You don't have permission"
This error indicates phpMyAdmin access restrictions or permission issues.
- Check Apache is running properly
- Verify phpMyAdmin folder exists in htdocs directory
- Check file and folder permissions (755 for folders, 644 for files)
- Review httpd.conf Apache configuration file
- Check .htaccess file isn't blocking access
- Ensure phpMyAdmin configuration allows localhost access
Error: "The mysqli extension is missing"
PHP's MySQL extension is not enabled.
- Open php.ini configuration file in text editor
- Find line
;extension=mysqli - Remove semicolon to uncomment:
extension=mysqli - Save php.ini and restart Apache web server
- Check phpinfo() to verify mysqli is loaded
Error: "The mbstring extension is missing"
PHP's mbstring extension is required for phpMyAdmin.
- Open php.ini file
- Uncomment
extension=mbstring - Save changes and restart Apache
- Verify extension is loaded in PHP configuration
Error: "404 Not Found - The requested URL /phpmyadmin was not found"
phpMyAdmin is not installed or not in the correct location.
- Verify phpMyAdmin folder exists in web server document root
- Check folder name spelling and case (phpMyAdmin vs phpmyadmin)
- Ensure phpMyAdmin is in htdocs folder for XAMPP
- For WAMP, check it's in www folder
- Reinstall phpMyAdmin if files are missing
- Check Apache virtual host configuration
Error: "Wrong permissions on configuration file, should not be world writable"
Security warning about config.inc.php file permissions.
- Change config.inc.php permissions to 644 on Linux
- On Windows, remove write permissions for other users
- Use command:
chmod 644 config.inc.php - Restart web server after changing permissions
phpMyAdmin Configuration File Locations
Edit config.inc.php to configure phpMyAdmin database connection settings:
- XAMPP Windows:
C:\xampp\phpMyAdmin\config.inc.php - XAMPP Linux:
/opt/lampp/phpmyadmin/config.inc.php - WAMP Windows:
C:\wamp\apps\phpmyadmin\config.inc.phporC:\wamp64\apps\phpmyadmin\config.inc.php - MAMP Mac:
/Applications/MAMP/bin/phpMyAdmin/config.inc.php - Ubuntu/Debian:
/etc/phpmyadmin/config.inc.php - Standalone: Look in your phpMyAdmin installation directory
Important config.inc.php Settings
Key configuration options in phpMyAdmin config file:
How to Reset MySQL Root Password
- Stop MySQL service from XAMPP control panel
- Open command prompt as administrator
- Navigate to MySQL bin directory
- Start MySQL in safe mode:
mysqld --skip-grant-tables - Open new command prompt and run:
mysql -u root - Execute SQL:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword'; - Flush privileges:
FLUSH PRIVILEGES; - Exit and restart MySQL normally
- Update password in config.inc.php if needed
phpMyAdmin Security Best Practices
- Change MySQL root password immediately after installation
- Never use phpMyAdmin on production servers exposed to internet
- Restrict phpMyAdmin access by IP address in config
- Use strong passwords with letters, numbers, and special characters
- Keep phpMyAdmin updated to latest version for security patches
- Enable two-factor authentication if available
- Use HTTPS instead of HTTP for encrypted connections
- Set proper file permissions on config.inc.php (644 or 600)
- Disable root login and create separate admin users
- Enable phpMyAdmin login timeout for inactive sessions
- Review and limit user privileges - use principle of least privilege
ALTER USER 'root'@'localhost' IDENTIFIED BY 'YourStrongPassword123!';
Common phpMyAdmin Tasks and Queries
Create a New Database
Create a Database User
Import SQL File
- Click on database name in left sidebar
- Click "Import" tab
- Click "Choose File" and select your .sql file
- Click "Go" to import
Export Database Backup
- Click on database name
- Click "Export" tab
- Select "Quick" or "Custom" export method
- Choose SQL format
- Click "Go" to download
phpMyAdmin Alternatives
Other database management tools you can use:
- Adminer - Lightweight single-file database manager
- MySQL Workbench - Official MySQL desktop GUI tool
- HeidiSQL - Windows MySQL client
- DBeaver - Universal database tool
- TablePlus - Modern database client for Mac/Windows
- Sequel Pro - MySQL client for Mac
Frequently Asked Questions
Why can't I access localhost/phpmyadmin?
Check that Apache and MySQL services are running, phpMyAdmin is installed in the correct directory, and you're using the right URL. Try 127.0.0.1/phpmyadmin or localhost:8080/phpmyadmin as alternatives.
What is the default phpMyAdmin username and password?
For XAMPP and WAMP, the default username is root with a blank password (no password). For MAMP, both username and password are root.
How do I change phpMyAdmin password?
Login to phpMyAdmin, go to User Accounts, click Edit for root user, and set a new password. Then update the password in config.inc.php file.
Can I use phpMyAdmin remotely?
Yes, but it's not recommended for security reasons. If you must, configure firewall rules, use HTTPS, restrict by IP, and use strong authentication.
Related Resources and Links
- localhost:3306 - MySQL default port information
- localhost/xampp - XAMPP control dashboard
- localhost:8080 - Alternative HTTP port
- localhost/adminer - Adminer database tool
- localhost/wordpress - Local WordPress setup
- Troubleshooting Guide - Fix localhost issues
- Connection Refused - Network errors