02. Accessing Your Database via phpMyAdmin Print

  • 0

Accessing Your Database via phpMyAdmin

While the MySQL Database tool is for creating the "container" and "user," phpMyAdmin is the actual interface used to look inside your database, edit tables, and run SQL queries. It is vital for troubleshooting website errors, such as a lost WordPress admin password or a "Error Establishing a Database Connection."

How to Access phpMyAdmin

  1. Log in to cPanel: Navigate to the Databases section.
  2. Click phpMyAdmin: This will automatically log you in and open a new browser tab.
  3. Select Your Database: In the left-hand sidebar, click the database you wish to manage to expand its tables.

Common Tasks in phpMyAdmin

  1. Browsing Data:
    • Click a table name (e.g., wp_users) to view rows of data.
    • Click Edit on any row to manually change a value.
  2. Exporting a Database (Backing Up):
    • Select your database from the left sidebar.
    • Click the Export tab at the top.
    • Choose the Quick method and SQL format.
    • Click Export to download a .sql file.
  3. Importing a Database:
    • Select your (empty) database.
    • Click the Import tab.
    • Choose the .sql file from your computer.
    • Click Import at the bottom.
  4. Running SQL Queries:
    • Click the SQL tab at the top.
    • Paste the SQL code into the box and click Go.

Crucial Safety Warnings

  • No "Undo" Button: Once you delete a table or change a value, it is permanent. Always export a backup before making manual changes.
  • Character Sets: When importing, ensure the "Character set of the file" matches your export (usually utf8 or utf8mb4). Using the wrong one can cause your website to display strange symbols.
  • The wp-config.php Link: phpMyAdmin only shows data. If you change your database password in the MySQL Databases tool, update your website’s configuration file or your site will break.

Was this answer helpful?

« Back