Welcome to the Internetport Knowledge Base guide on getting started with phpMyAdmin, a popular web-based tool used for managing MySQL and MariaDB databases. This beginner's guide will walk you through logging in, browsing your database tables, running SQL queries, importing/exporting data, and creating new tables. By the end of this tutorial, you'll be able to perform basic database management tasks efficiently.

Logging In to phpMyAdmin

To access phpMyAdmin, you need to log in through your hosting control panel, such as Plesk or cPanel.

Via Plesk

  1. Log into your Plesk account by visiting the provided URL and entering your credentials.
  2. In the left-hand menu, click on "Databases."
  3. Select the database you want to manage from the list.
  4. Click on the "Webadmin" button next to the database name. This will open phpMyAdmin in a new tab or window.

Via cPanel

  1. Log into your cPanel account by visiting the provided URL and entering your credentials.
  2. In the "Databases" section, click on "phpMyAdmin."
  3. Select the database you want to manage from the drop-down menu at the top left of the page.

Browsing Tables

Once logged in, you can browse through your tables and view their contents.

  1. In the left-hand navigation pane, click on a database name to expand it.
  2. Click on a table name to open it. You will see an overview of the data in that table.

Running SQL Queries

You can execute SQL queries directly from phpMyAdmin to manipulate your database.

  1. In the main interface, click on the "SQL" tab at the top of the page.
  2. Enter your SQL query in the text area provided. For example: SELECT * FROM users;
  3. Click the "Go" button to execute the query.

Importing/Exporting Data

phpMyAdmin allows you to import data from and export data to SQL files, which is useful for backups or migrating databases.

Exporting Data

  1. Select the database or table you want to export in the left-hand navigation pane.
  2. Click on the "Export" tab at the top of the page.
  3. Choose your preferred format (usually SQL) and click the "Go" button. Your file will download automatically.

Importing Data

  1. Select the database where you want to import data in the left-hand navigation pane.
  2. Click on the "Import" tab at the top of the page.
  3. Choose your SQL file by clicking "Browse," then click the "Go" button to start the import process.

Creating Tables

To create a new table, follow these steps:

  1. Select the database where you want to create the table in the left-hand navigation pane.
  2. Click on the "Create" tab at the top of the page.
  3. Enter a name for your new table and specify the number of columns it will have.
  4. Define each column's properties, such as field name, type, length/size, index, and default value.
  5. Click the "Save" button to create the table.

Safety Warnings

  • Backup your data: Always back up your database before performing any operations that modify or delete data.
  • Use strong passwords: Ensure that your phpMyAdmin login credentials are secure and use a strong password to protect access to your databases.
  • Be cautious with SQL queries: Incorrect SQL commands can lead to data loss. Double-check all queries before execution.

Troubleshooting

  • If you encounter issues logging in, verify that you are using the correct database credentials and have access permissions.
  • For problems with importing/exporting files, ensure that the file format is supported and that the file size does not exceed server limits.
  • In case of errors while creating tables or running queries, check the error messages for guidance on what might be going wrong.

We hope this guide helps you get started with phpMyAdmin. If you have any further questions, please contact our support team for assistance.