This tutorial is to teach you how to run MySQL queries on a database with phpMyAdmin. We will assume that you are currently logged into phpMyAdmin, and for the purpose of this tutorial, we will use a database with two tables as our example. The phpMyAdmin main screen is broken into two sections. The left hand side is blue, and this is where you will find your database listed. Below the database, you will see the names of the tables that are in the database. The right hand side is a large white window, and this is where the activity takes place.
To run MySQL queries on a database, the first thing you need to do is click the on the name of the database table that you want to run a MySQL query on. This opens the table details in the right hand of the phpMyAdmin setup window. As you learned in another tutorial, “Deleting fields from database tables with phpMyAdmin”, you can delete a field from a table by checking the box in the field row, and clicking on the Delete icon (the big red X below the table). In this tutorial, you are going to learn how to delete a field using pure MySQL commands.
Go to the right hand side and click on the database name. This will bring up the details for the database in the right hand window of the phpMyAdmin setup. Click the MySQL button at the top of the window. This opens a box, titled “Run MySQL query/queries on database. You will then need to type the MySQL command to delete the field from the table into the box. It would look something like this: ALTER TABLE ‘this is where the name of the table goes’ DROP ‘this is where the name of the field goes’ . Then when you are done, you click on Go. A pop-up will ask if really want to perform the action. Click OK. The command screen will then confirm that your MySQL query has been successful. You have just deleted a field from a table.
For more information about MySQL syntax, visit the MySQL documentation available here. Just click on the icon under the phpMyAdmin name, that has the red MySQL on it. This is the end of this tutorial. You now know how to run a MySQL query on a database using phpMyAdmin setup.
- How to import databases and tables using phpmyadmin (mdalemark89.wordpress.com)
- How to export databases and tables using phpmyadmin (mdalemark89.wordpress.com)
- MySQL and phpMyAdmin relations (2) (matthewlam166.wordpress.com)
- phpMyAdmin 4.0.5 RC2 Is Now Available for Download and Testing (news.softpedia.com)
- Import Excel Data Into MySQL Using phpMyAdmin (zendtutorial.wordpress.com)
- How to create a table in a database in phpmyadmin (mdalemark89.wordpress.com)
- How to modify fields in database tables using phpmyadmin (mdalemark89.wordpress.com)
- phpMyAdmin 4.0.5 RC1 Is Now Available for Download and Testing (news.softpedia.com)