Site icon TestingDocs.com

Start MySQL Client on Windows 11

Overview

This tutorial will teach steps to Start MySQL Client on a Windows 11 machine. The most common use case is that MySQL client allows you to connect to a MySQL Server and issue and execute SQL commands.

Start MySQL Client

Open the Windows 11 Command prompt.

For example, to connect as the MySQL root user, issue the following command:

/> mysql -u root -p

It prompts for the root password.

Enter the root password.

The following information will be displayed on the screen.

Response

A sample response is shown below:

————————————

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.27 MySQL Community Server – GPL

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’ to clear the current input statement.

————————————

Let’s understand the MySQL server response:

The prompt changes to MySQL prompt. This indicates that we are connected to the server and issue SQL commands at the prompt. MySQL client commands will end with semi-colon or \g.

mysql>

The successful connection would display the above response on the screen. This would display the client connection id and the MySQL Server version information.

Oracle license information and the help commands are also displayed.

Command-Line Options

To learn about MySQL client command-line options:

Mysql Command-line Options

That’s it. We have successfully started a MySQL client and connected it to the server.

MySQL Tutorials

MySQL Tutorials on this website:

https://www.testingdocs.com/mysql-tutorials-for-beginners/

 

Exit mobile version