DEV Community

David Kanekanian
David Kanekanian

Posted on

E2 - Create Database from MySQL Console

Open phpMyAdmin (see Entering SQL commands) and enter these commands:

1. Delete the database from the previous example.

DROP DATABASE NeatTreats;
Enter fullscreen mode Exit fullscreen mode

2. Create the new Neat Treats database.

CREATE DATABASE NeatTreats;
Enter fullscreen mode Exit fullscreen mode

3. Make sure you edit this database going forward.

USE NeatTreats;
Enter fullscreen mode Exit fullscreen mode

4. Create the customer table in the new database. Don't worry about adding too many columns yet. We aren’t going to have preloaded records like the previous example. Instead the records will be inserted whenever a customer registers from the web form.

CREATE TABLE Customer (
    CustomerID INT,
    FirstName VARCHAR(125),
    LastName VARCHAR(125)
);
Enter fullscreen mode Exit fullscreen mode

Parent topic: Example 2

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay