Knowledgebase Home / How to Run SQL Queries in phpMyAdmin

How to Run SQL Queries in phpMyAdmin


This article demonstrates how to run SQL queries in phpMyAdmin.

SQL queries are commands that are issued to the MySQL server to perform various functions. Used by advanced users, SQL queries can quickly make changes to your database simply by issuing the appropriate commands.

You can execute a MySQL query towards a given database by opening the database with phpMyAdmin and then clicking on the SQL tab.

Quick Steps

  1. Go to cPanel > Software >phpMyAdmin.
  2. Navigate to the area your SQL query will apply to. Select the database or the tables you want run the queries against.
  3. Click on the SQL tab.
  4. Type in your SQL query.
  5. Click on Go to execute the query.

Running SQL Queries

From cPanel, click on phpMyAdmin.

cPanel main page

cPanel main page

Select the database or the tables you want run the queries against and then click on the SQL tab. 

phpMyAdmin main page.

phpMyAdmin main page.

On the next page, add the desired query on the text box provided. When ready click on Go to execute the query. 

Adding a MySQL query.

Adding a MySQL query.

The page will refresh as your SQL query is executed and the results from the query is provided.

Query result.

Query result.

Conclusion

The SQL query has been executed and the actions you requested are performed. The command screen will now confirm that your SQL query has been executed successfully.

We'd love to hear your thoughts. How can we make this better?


If the steps above listed in this article do not resolve your issue, please feel free to open a support ticket and we’d be happy to take a look.

Looking for better web hosting? Sign up today and take 50% off your first month with promo code: 1stmonth50

Our Guiding Principles

  • Provide consistent, stable and reliable web hosting services.
  • Ensure rapid ticket response and quick resolutions to issues.
  • Never saturate or over-provision servers to ensure stability and speed for our customers.
  • Use only high quality enterprise-class hardware to ensure minimal downtime from hardware failures.
  • Provide clear pricing with no hidden fees or gotchas.