What Is phpMyAdmin? localhost/phpmyadmin Login, Creating and Backing Up Databases

Sunucun 3 min read

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.

Illustration: What Is phpMyAdmin? loc…

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)

  1. Open the XAMPP Control Panel and Start both Apache and MySQL.
  2. Go to http://localhost/phpmyadmin or http://127.0.0.1/phpmyadmin.
  3. According to the XAMPP FAQ, the MySQL root user has no password by default; if prompted, enter root and 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

TaskHow
Create a databaseDatabases 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 SQLSQL tab > type the query > Go. Back up before DELETE/UPDATE.
Repair / optimiseTick 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

Latest guides