DEV Community

David Kanekanian
David Kanekanian

Posted on

E1 - Creating database from MySQL console

Open phpMyAdmin (see Getting Started) and enter these commands:

  1. Create the Neat Treats database.

    CREATE DATABASE NeatTreats;
    
  2. Make sure you edit this database going forward.

    USE NeatTreats;
    
  3. Create the welcome message table in the new database. Don't worry about relationships yet.

    CREATE TABLE WelcomeMessage (
    MessageID INT,
    Message VARCHAR(255)
    );
    
  4. Insert a row into the table. Make sure to use ' single quote rather than " double.

    INSERT INTO
    WelcomeMessage (MessageID, Message)
    VALUES
    (1, 'Welcome');
    

Parent topic: Example 1

Top comments (0)