Return to "ValueApps - Databases"

Managing Databases with PhpMyAdmin


 
The topic of this article is not supported by our customer support department, however for your convenience we are providing this material to assist you in troubleshooting potential issues related to this topic.

PhpMyAdmin is a web-based Graphic User Interface (GUI) for working with MySQL databases.  It allows even a novice database user to quickly and easily manage databases without having to learn the arcane command line interface of MySQL.

The first step to using a database is to create one so that you can then populate it with your information.


Installing PhpMyAdmin
Log in to your VDS Manager by clicking the ‘Login to VDS Manager’ link from the Products page of the Customer Manager, which is located at https://my.opensourcehost.com.

Click on Install & Manage on the left

Click on the Database folder at the top of the page

Click on PhpMyAdmin under the Available ValueApps section on the left

Agree to the license

Click the button

You will now see a link labeled “Launch Application” next to PhpMyAdmin under Installed ValueApps that you can click to access your database information; you can also use this direct link to access PhpMyAdmin using your VDS Manager username and password:
http://yoursitedomain.com/phpmyadmin/


Creating a Database

First, log in to phpMyAdmin using the “Launch Application” link or the phpMyAdmin URL listed above.

In the “Create new database” text box, enter a name for your database

Click the “Create” button

After your database is created, it will be listed on the left-hand side of the phpMyAdmin window, and will be ready to be populated with tables.


Creating a Table

On the left-hand side of phpMyAdmin, click on the database in which you wish to create the new table

Under “Create new table on database?” enter the following information:

  • Name - Enter the name of the table
  • Fields - Enter the number of fields for the table

Click the “Go” button
On the next screen, enter the following information for each field of the table:

  • Field - Enter a name for the field
  • Type - Select the type of field
  • Length/Set - Depending on which type of field you have, you may need to enter a variable here
  • Attributes - Select an Attribute
  • Null - Select “not null” for fields that must have a value entered and “null” for fields which can be left empty
  • Default - Enter a value if you want the field to have a default value
  • Extra - Select whether or not you want the field to automatically go in increments. For example, you may want to auto-increment a field so that each of the records will have a different number associated with it.
  • Select whether you want the field to be “Primary”, “Index”, and or “Unique“
  • Optionally, enter a comment for the table
  • Click the “Save” button

Important Note: For more information on MySQL terminology, visit the MySQL documentation site at http://dev.mysql.com/doc/refman/5.0/en/


Managing Databases and Tables

Now that you have your database created and have started tables inside of it, you can begin populating your database with records.

  • Click on the name of the database on the left-hand side of the phpMyAdmin interface

From here, you will have the following options:

  • Browse - Displays the data in the database in a tabulated view, allowing you to quickly manage your records.
  • Select - Allows you to search for a particular record or records.
  • Insert - Allows you to add data to the table.
  • Drop - Deletes the entire table and all data inside of it.
  • Empty - Deletes all of the data from the table, but leaves the structure intact.

You can find more information about working with databases, tables, records, and creating SQL queries at the MySQL Documentation site, http://dev.mysql.com/doc/mysql/en/index.html


 

Related Articles: