Internal, open access

MySQL Database administration using phpMyAdmin

Your MySQL database can be administered from the web. This is done using an application called phpMyAdmin. phpMyAdmin can be used for setting up the database tables and to import data and/or schema. We are currently running version phpMyAdmin 2.11.4

Access to MySQL databases is controlled by using MySQL users. Only registered WWW Information Providers can apply to be registered the owner of a MySQL user. The MySQL user is granted full access to the database created for it. A registered owner of a MySQL user may request additional databases.

Before using this application you will need to have

a) obtained a Web Information Provider username and password,
b)
filled in the  Application for a MySQL Database and received confirmation that it has been created on the MySQL Server

Accessing phpMyAdmin

To use phpMyAdmin there is no need to download or install any software. It is accessed using the University's own network. You can login with your MySQL user name and password above at https://mysql.reading.ac.uk/. To access your database click on the Databases link and then the link to your database.

Warning

WARNING: Your MySQL user name and password will appear in PHP scripts that connect to the MySQL database. If you are not careful about how you set permissions other Information Providers will be able to access these scripts and see your MySQL user name and password. We recommend that you use the publish command on your PHP scripts. This will ensure the scripts will be accessible via the web but prevent other users accessing them. To check the permissions on your scripts proceed as follows:

  1. We recommed you use Cyberduck, instructions on how to configure this can be found Remote Access: SSH Gateway
  2. Logon with your Information Provider username, i.e. wxx
  3. Go to the directory containing the critical scripts (type 'ls' then <Enter> to see the contents of the home directory and
    'cd directoryname'
    
    then <Enter> to change to a sub directory, where directoryname is the name of the directory you wish to go to).
  4. Type ls -l and then <Enter> to see the permissions on your scripts. You should see results like this:
    -rwxr-x--- 1 wxxx www 363 Feb 10 17:22 index.php
    
    '-rwxr-x---' represents the permission on the folder. The last three characters should be '---' but if instead they read 'r-x' or 'rwx' there are global read permissions on your scripts you need to take action.
  5. To alter the permissions on the files in a directory type
    'publish *'
    
    and then Enter. Your scripts will now be safe.

Please note you can access your Web Information Provider home directory using SSH as an alternative to telnet.

Using your database

The MySQL user created for your database gives you full control to create and query tablesbut no administrative privileges such as creating further users for the database. You will not be able to create or delete databases, so if you need a new database or you wish to have a database deleted, please email a request to ITS Help. It can then be processed correctly so that your access to other databases that you may have on the server is not affected.

Creating new tables

  1. From the phpMyAdmin homepage your database click on the Databases link.
  2. Click on the name of the database to which you wish to add a table.
  3. Enter the name of the new table and the number of fields it will have in the Create new table on database form.
  4. You can then define each field, including any indexes you require. Full details of the data types available are available on the MySQL web site. Note that different types of table are available, by default it will use the MyISAM storage engine. For information on the different storage engines in MySQL see the MySQL documentation.

Importing data

If you have an existing database you would like to import, you can run an SQL dump against your database as follows. Click on the SQL tab. You will see a large box for any manual commands you wish to run, and a small box with the title Or location of text file. Click on the [Browse] and locate your *.sql file, and click on [Go]. The new tables will then be listed to the left. Please note the upload limit is 2,048KB and so any database larger than this should be imported via a series of partial dumps.

Logging out of phpMyAdmin

To log out, simply click on the Logout link in the phpMyAdmin homepage. You will then see a login prompt. This is because phpMyAdmin is expecting a login with another MySQL user name and so you can safely click on [Cancel] to complete the logout.

Page navigation

 

Search Form

A-Z lists