Curriculum
Course: SQL-100-Queries-Solutions
Login
Text lesson

Start MySQL and ses Database & Tables

1-Initial commands to see Databases and Tables.

 

  1. Check if MySQL is already installed on my computer or not. 

    1. Open Command Prompt.

    2. Gave command: mysql — version

    3. mysql  Ver 8.0.44 for Win64 on x86_64 (MySQL Community Server – GPL)

    4. Otherwise show:   ‘mysql’ is not recognized as an internal or external command,

    5. Install MySQL software.

 

  1. To start MySQL : 

  • Open Command Prompt.

  • Gave command: mysql – u root -p   

  • Type the password.

  • Then the prompt will be MySQL>

 

  1. To see all Databases : 

          Show databases;

 

  1. To create a Database: 

             create database sdb;

A database created with the name of sdb. Here, sdb is a database name.

 

  1. How to activate a database:

            Use sdb;

 

  1. To see which Database is presently active:

            Select database();

 

  1. To see Tables in a Database:

Show tables;

 

  1. To Stop/Exit from Database:

Exit or Quit

Scroll to Top