...

/

Create and Select a Database

Create and Select a Database

Learn about basic SQL commands to create and use databases.

Start MySQL client

Let’s start by creating the CRM database. Click on the widget at the end of the lesson to connect the terminal. Start the MySQL client with the command mysql -u root to start the command-line interface to access the MySQL server.

Note: If our root user has a password, we need to start MySQL with the command mysql -u root -p and type the password when prompted. Keep in mind that “root” is a username.

Verify that we got the following response indicating the successful connection with the MySQL server when we practice in the terminal widget at the end of the lesson:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.36-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c'
...