phpMyAdmin is a free tool written in PHP for managing MySQL and MariaDB databases in the browser. Without the command line you can create databases and tables, browse and edit rows, run SQL queries, and export or import databases. Locally with XAMPP it opens at http://localhost/phpmyadmin; on hosting, through cPanel or Plesk.
What You Can Do
- Create, edit and drop databases, tables, columns and indexes
- Browse, search, insert and edit rows
- Run SQL queries, including batch queries
- Export and import in formats such as SQL and CSV
- Manage database users and privileges (if permitted)
- Visualise relations between tables
Opening localhost/phpmyadmin (XAMPP)
- Open the XAMPP Control Panel and Start both Apache and MySQL.
- Go to
http://localhost/phpmyadminorhttp://127.0.0.1/phpmyadmin. - According to the XAMPP FAQ, the MySQL root user has no password by default; if prompted, enter
rootand leave the password empty.
XAMPP’s own documentation says it is meant for development, not production. Set a root password before exposing your machine to a network. See what is XAMPP and what is localhost.
phpMyAdmin on Hosting
- cPanel: click phpMyAdmin under Databases; you are logged in automatically. Create the database and user first in MySQL Databases (see database management in cPanel).
- Plesk: Databases > your database > phpMyAdmin.
- Your own VPS/VDS: install it yourself and don’t leave it public; use IP restrictions, extra HTTP auth or an SSH tunnel, and consider changing the default /phpmyadmin path.
Basic Tasks
| Task | How |
|---|---|
| Create a database | Databases tab > name > a utf8mb4 collation such as utf8mb4_unicode_ci > Create. (On shared hosting this is usually done in the panel.) |
| Back up (export) | Select the database > Export > Format: SQL > Go. |
| Restore (import) | Select an empty database > Import > choose the .sql (or .sql.zip/.gz) file > Go. |
| Run SQL | SQL tab > type the query > Go. Back up before DELETE/UPDATE. |
| Repair / optimise | Tick tables > Repair table or Optimize table from the menu below. |
Common Errors
- localhost/phpmyadmin won’t open: Apache isn’t running. Start it in XAMPP; if another program uses port 80, change Apache’s port and add it to the URL (e.g.
localhost:8080/phpmyadmin). - #2002 – Cannot connect to server: the MySQL/MariaDB service is stopped; start MySQL in XAMPP.
- #1045 – Access denied: wrong username or password; if you changed the root password, update config.inc.php too.
- Import size limit: large .sql files hit PHP’s upload_max_filesize and post_max_size; compress the file, raise the limits or import from the command line (
mysql -u user -p database < backup.sql).
See also what is MySQL. For phpMyAdmin ready to use, see our cPanel hosting; for a full database server, our VDS server plans.
Frequently Asked Questions
Is phpMyAdmin free?
Yes. It is free, open-source software bundled with XAMPP, cPanel and Plesk.
Is phpMyAdmin the same as MySQL?
No. MySQL (or MariaDB) is the database server; phpMyAdmin is the web interface for managing it.
What is the phpMyAdmin password?
phpMyAdmin has no password of its own; you log in with a MySQL user. In XAMPP the default is root with an empty password; on hosting, use the database user you created in cPanel or Plesk.
Categories
-
CentOS 7 guides
-
cPanel 19 guides
-
CyberPanel 18 guides
-
Operating Systems 80 guides
-
Juniper Networks 18 guides
-
Control Panels 49 guides
-
Linux 15 guides
-
MySQL 30 guides
-
Network 87 guides
-
Plesk Panel 12 guides
-
Virtual Servers 284 guides
-
SEO 3 guides
-
Cyber Security 5 guides
-
Technology 160 guides
-
VMware 38 guides
-
WordPress 20 guides
-
Artificial Intelligence 21 guides