Step 3: PhpMyAdmin & Database Setup
I am assuming that you have phpMyAdmin set up, alongside PHP5. If not, click here for an Instructable on how to do this.
Firstly, download the sql file from here.
Login to your phpMyAdmin control panel, then press the "Import" button on the top bar.
Now, under the "File to Import" heading, click the "Choose File" button, and select the file you downloaded previously (gpio.sql).
Finally, at the bottom of the page, click the "Go" button.
This will set up all of the tables needed to ensure the the script functions as it should on your Raspberry Pi.
Now, you need to add a user to the database from within phpMyAdmin. To do this;
Click the "Users" button on the top bar.
Now click the "Add User" link (about half way down the page on the left).
In the "User name" field, enter a suitable username. I went with "gpio".
In the "Host" field, enter "localhost".
Then in the two password fields, enter a suitable password. (No spaces, Hypehens or special characters). I went with "pr03ND2".
Now leave all of the rest as default, then click the "Add User" button on the bottom right.
The final part for this step is to give the user the correct privileges.
Click the "Users" button on the top bar, then scroll down until you see the user you have just added in the "Users Overview" table.
Across from the username, click the "Edit Privileges" link.
Scroll down to the heading "Database-specific privileges" and select "gpio" from the drop down list box, and click the "Go" button.
Select ALL of the check boxes, then click the "Go" button on the bottom left.
Congratulations - That's the database set up.