Home Member
Center
Web
Hosting
List
Services
Help
Center
About Us  
 

Home :: Help Center

Working with PHP and mySQL on Prairienet

For information on requesting setup of a mySQL database as well as applicable guidelines, fees, and policies, please see Request a mySQL database. The following information

Your Prairienet Database

Tech Support
We have limited staff resources and regret that we cannot offer tech support for database developers. For tech support on database set up and access, please e-mail Tech Support at support[at]prairienet.org.

Database User Accounts
The initial DBadmin account that has been created for you has all the privileges that you need to develop and administer your database. This account is to be used for the top-level database admin's access only. As database admin, this account can create other user accounts with lesser privileges.

When providing access to the database functions via the Web, please create user accounts with minimum number of privileges needed to carry out the desired functions. For example, a user who only needs to search the database should have read access but should not be given the ability to modify or delete data. See the mySQL manual for more details on mySQL User Account Management

phpMyAdmin
Prairienet offers phpMyAdmin, a Web-based tool for database development and maintenance. It is available at:
https://www.prairienet.org/phpMyAdmin.
Log in with your DBadmin username and password.


Backing up your database

Although Prairienet does routine systems backups, we strongly recommend that database administrators do regular backups of their own databases.

You may make your own backups of your database by using the command mysqldump from the command line. Log in to your account via SSH, go to the UNIX shell. Type:

mysqldump -h firefly -u your username -p yourdatabase > backup-file.sql

This will create a text file that can be used to restore your database in the event of data corruption or loss.

Alternatively, you can also use the Export feature of phpMyAdmin to dump database schema as well as data.


PHP Resources

PHP Tutorials. Flash tutorials for non-technical beginner.

http://www.php.net/ This is the official site for PHP. It includes a tutorial and explanations of all of PHP's features.

Php Manual You can download this manual and use it on your computer. It is pretty much the same information that is online.

Php Builder A fairly good source for articles about using Php.

HTML-Kit If you are looking for an editor to use then I would recommend this one. I think it is probably the best all around editor available -- and it is free.

HotScripts You can find just about every Php program in existence on this site. Before you go to the trouble of writing your own script it is a good idea to check here to see if you can find one to suit your needs.

Installing Php and Mysql

If you are doing a lot of work with Php it is helpful to have it working on your local computer. It is pretty easy to do. There are two installation programs that seem to be good. FoxServ installs Apache, Php, and Mysql. I used Foxserv a couple years ago and found that it worked well. Firepages Phpdev is another installation kit that gets good reviews from people that use it. Both programs are a typical windows installation. Just click on the setup file and everything should be set up for you. If you like you can also download and install Apache, Mysql , and Php separately. Apache and Mysql just require a click on the setup file. With Php you may need to edit the Apache configuration file and manually place some of the Php files in the correct places. There are good instructions for what you need to do in the PHP download.


mySQL Resources

Mysql This is the main site for mysql. Mysql has good documentation. You can usually find anything you need to know on this site.

Mysql Manual You can get the manual in a windows help file format here.

SQLyog is a frontend for Mysql that you can install on your local computer. It has all the functions that you need to manage your databases. It also has a nice feature that lets you synchronize two databases. This can be very handy if you are working on a database on your local computer and want to apply the changes to your database at Prairienet.

PHPCodeGenie can connect to your database and generate the forms and PHP code that you can use to manage your database.

ezSQL is a PHP class that may make working with your database a little easier.

MySQL User Account Management The initial user account that was made for you has all the privileges that you need to administrate your database. You may want to create users that have fewer privileges. For example you may want to create a user who can view your data but not change it. This section of the Mysql manual explains how to do this.