In this tutorial, we will learn steps to Start MySQL Client on
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 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 would be displayed on the screen.
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
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.
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.
To learn about MySQL client command-line options:
That’s it. We have successfully started a MySQL client and connected it to the server.
MySQL Tutorials on this website:
For more information on MySQL Database: