Let's Get Started with a MySQL Database!

  1. Use your favorite browser to open http://localhost/
  2. Click: PHPMyAdmin
  3. Login using root as the username and nothing as the password
  4. To create a ub database, click: New
  5. In the Create Database textbox type: ub
  6. Click: Create
  7. Click the SQL tab
  8. Copy the MySQL Database Template (SQL) code (below)
  9. Paste that code into the Run SQL Queries textfield
  10. Click: Go
  11. View results
  12. Expand your ub database
  13. Click the dishes table
  14. Click: Insert
  15. Enter a new record or two (2)
  16. Click: Go
  17. 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