Let's Get Started with a MySQL Database!

  1. Start your local web server if it is not already running
  2. Use your favorite browser to open http://localhost/
  3. Click: PHPMyAdmin
  4. Login using root as the username and nothing as the password
  5. To create a sjci database, click: New
  6. In the Create Database textbox type: sjci
  7. Click: Create
  8. Click the SQL tab
  9. Copy the MySQL Database Template (SQL) code (below)
  10. Paste that code into the Run SQL Queries textfield
  11. Click: Go
  12. View results
  13. Expand your sjci database
  14. Click the dishes table
  15. Click: Insert
  16. Enter a new record or two (2)
  17. Click: Go
  18. View results

MySQL Database Template (SQL)

PHPMyAdmin SQL Entry Prompt
CREATE TABLE dishes ( dish_id int(11) AUTO_INCREMENT PRIMARY KEY, dish_name varchar(50), price float DEFAULT NULL, is_spicy tinyint(1)DEFAULT NULL ); INSERT INTO dishes (dish_id, dish_name, price, is_spicy) VALUES (1, 'Fish Ball with Vegetables', 4.25, 0), (2, 'Spicy Salt Baked Prawns', 5.5, 1), (3, 'Steamed Rock Cod', 11.95, 0), (4, 'Sauteed String Beans', 3.15, 1); SELECT * FROM dishes;
SELECT OUTPUT