phpMyAdmin: Frequently Asked Questions


Table of Contents

  1. What is PhpMyAdmin?
  2. What is the URL and login information for PhpMyAdmin?
  3. Can I use PhpMyAdmin for database design?
  4. What database tools are available in PhpMyAdmin?
  5. What are the primary interface elements in PhpMyAdmin?
  6. What does the "Browse" link do?
  7. What does the "Select" link do?
  8. What does "Insert" do?
  9. What does "Properties" do?
  10. What does "Drop" do?
  11. What does "Empty" do?
  12. How can I export the contents of a table to a text file?
  13. But can I import data from a spreadsheet or database into MySQL with PhpMyAdmin?

Questions and Answers


What is PhpMyAdmin?

PhpMyAdmin is an open source web application that provides an web based interface to the MySQL database server. PhpMyAdmin can be downloaded from Source Forge in a variety of file formats. Documentation is available at PhpMyAdmin.net

How do I use PhpMyAdmin?

You can access access phpMyAdmin by logging into the Account Manager and clicking on the "Manage MySQL" icon.

Can I use phpMyAdmin for database design?

Database design is a huge subject unto itself. As a novice/intermediate database application developer, I would recommend that the MySQL newbie investigate this subject thoroughly. Some of the best resources for this that I've used are:

What database tools are available in phpMyAdmin?

phpMyAdmin can currently:

  • create and drop databases
  • create, copy, drop and alter tables
  • delete, edit and add fields
  • execute any SQL-statement, even batch-queries
  • manage keys on fields
  • load text files into tables
  • create (*) and read dumps of tables
  • export (*) and import data to CSV values
  • administer multiple servers and single databases
  • check referential integrity
  • communicate in more than 38 different languages

What are the primary interface elements in phpMyAdmin?

phpMyAdmin's main interface occupies a 2 column layout presented in frames. In the left frame, the user views databases and tables available. Choose a table from the list to perform any actions. On the opening screen, the user is provided with an option to create a new table.

In the right frame are the commands and views available for those databases and tables. This is where the real work on a database takes place. For each table in the database, at the top of the page, there are links to "Browse", "Select", "Insert", "Properties", "Drop" and "Empty". I'll cover these one at a time.

What does the "Browse" link do?

For tables that contain rows, the "browse" link gives you a view of the data in that table and row by row, with column head links that allow you to sort the data by any of the columns.

What does the "Select" link do?

The "Select" page is just an aide to building queries and provides the user with a list of the columns available and a "where" clause that can be specified. There are also text fields for querying "by example", where you would type the string you are looking for into a column's input and query for all rows where that string matched the data in that column.

What does "Insert" do?

Insert provides input fields (with values set to their defaults) for adding a row to the table. When you "Insert", you create a new row, with its values set to whatever values you give to each field. Notice the data type descriptor, that gives you guidelines for what type of data will go in that field. There is also a selector for choosing functions to run your input through. To use the functions effectively you should really learn more about them and SQL in general.

What does "Properties" do?

Each table (or rather, each column) in a MySQL database has certain properties. The datatype, any attributes for the column, whether that column can contain null values, the default value for the column, any indices on that column, these are all properties of a MySQL table and can be quickly viewed on the PhpMyAdmin "Properties" screen. (Note: this same functionality will be replaced with the "Structure" screen in newer versions of PhpMyAdmin.)

What does "Drop" do?

Drop drops a table. Ctrl+"z" has no reversing effect on this (or other) procedures in PhpMyAdmin, be very careful.

What does "Empty" do?

"Empty" empties a table of its contents.

How can I export the contents of a table to a text file?

Select the table you want to export from the list in the left frame. In the main frame scroll down past the table properties to the "view dump (schema) of table". There are several options available, allowing you to choose how the data export will be presented. I usually just select "CSV for MS Excel Data" (since I'm going to undoubtedly want to edit or view this file in Excel) and "save as file". Click "go" and you'll be prompted for a location to save the file and there your MySQL table is now stored in a .csv file that you can read/edit in Excel or any other text/spreadsheet editor.

But can I import data from a spreadsheet or database into MySQL with PhpMyAdmin?

Of course you can! This is a little trickier though. For a "insert from textfile into table" to be successful, the data in the columns of your textfile must match the datatype of the column it will populate in MySQL. If you have a column decimal (3, 2) in MySQL and try to import a textfile that contains "135.64" for that column, you will get unexpected results. What will happen? The value stored in MySQL will be 9.99, the highest value that a decimal (3, 2) field can hold.

This is a great way to learn some of the finer points of SQL and databases and by experimentation with such a great interface. When using the "Insert data from a textfile into table" beware too of "column head" rows in your textfile being imported. It's pretty straightforward. Hit the "Insert data from a textfile into table" link and simply follow the prompts on the page. By default, the field separator character is a ";" and change this to "," (comma separated values). I've never had any luck with the "replace" checkbox and turning "replace" on has never had an effect for me, maybe this will work in future releases. If you want to replace a table's data with new data from a .csv file, first empty the table then "insert data from a textfile".

Need More Help?

Progressive Networks has a number of support options in addition to our FAQ's available for our members: