Skip to content

Instantly share code, notes, and snippets.

@apeeyush
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apeeyush/e70b421a83e8bc0b21e7 to your computer and use it in GitHub Desktop.
Save apeeyush/e70b421a83e8bc0b21e7 to your computer and use it in GitHub Desktop.
PHP CS252
sudo apt-get install apache2
netstat -an | more
cd /var/www
sudo apt-get install libapache2-mod-php5
sudo apt-get install php5-mysql
CREATE DATABASE `cs252`;
CREATE USER 'cs252_admin'@'localhost' IDENTIFIED BY 'adminuser';
GRANT ALL PRIVILEGES ON `cs252`.* TO 'cs252_admin'@'localhost';
CREATE TABLE `cs252`.`users` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`username` VARCHAR(50) NOT NULL UNIQUE,
`password` CHAR(128) NOT NULL
);
CREATE TABLE `cs252`.`files` (
`username` VARCHAR(50) NOT NULL,
`filename` VARCHAR(50) NOT NULL
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment