Computer Programming web Web programming Tips



MySQL Community Server 8.0.12 Installation on Windows. Part 4

By Sergey Skudaev


From the main menu select MySQL, MySQL Shell. The command prompt window is displied

MySQL Shell

You can type ´\help´ command to see all commands.

MySQL shell

To connect to the MySQL Server type the following command: ´\connect root@localhost/mysql´ and press enter. The shell prompts you for the password. Type the password for the root user and press enter. If the password is correct, you are connected.

MySQL shell

To switch to SQL mode, type ´\sql´ command. Then type: ´show databases;´ command. The list of databases are displayed.

MySQL shell

Copy the create table SQL statement and paste it to the command prompt window. Press enter. The student table is created.

  CREATE TABLE students (
  stid int(11) NOT NULL auto_increment,
  lastname varchar(20) default NULL,
  firstname varchar(20) default NULL,
  username varchar(20) default NULL,
  password varchar(100) default NULL,
  email varchar(100) default NULL,
  role varchar(20) default NULL,
  PRIMARY KEY  (stid)
);

MySQL shell

Insert a few student records

If you want to learn SQL visit the following web pages:

Learn SQL

XAMPP SHELL

MySQL Community Server 8.0.12 Installation on Windows. Part 1...

MySQL Community Server 8.0.12 Installation on Windows. Part 2...

MySQL Community Server 8.0.12 Installation on Windows. Part 3...

My eBooks on Amazon.com

US    UK    BR    CA
US    UK    BR    CA
US   UK   BR   CA