User login method of MySQL server

This article will introduce two ways to start the MySQL server and three ways to log in to the server

Note: MySQL starting server and logging in to the connection server are not the same concept; only after starting the server can you log in to the connection server

1. Loading and starting the MySQL server

1. Load MySQL and
enter "mysqld -install mysql" on the MS-DOS command line and press Enter.
Before entering the command, be sure to switch the path to the mysql installation path.

Insert picture description hereNote: There is no case sensitivity in the MS-DOS command line

2. Start MySQL
Method 1 : After successfully loading mysql, enter "net start mysql" on the MS-DOS command line and press Enter
Insert picture description here as shown in the figure above, then the startup is successful.

Method 2 : After successfully loading mysql, find the MySQL service in the service options of the computer control panel, click "Start" on the left or right-click and select "Start".
It will display "Running" after startup.
Insert picture description here

Two, log in to connect to the MySQL server

Note: Before logging in to the connection server, make sure that MySQL has been loaded and started successfully in advance. If it is not loaded or started, even if the following steps are correct, you cannot log in.

Method 1 : In MS-DOS, use the "mysql -u root -p" command to log in
. The root here refers to username (user name).
After pressing Enter, the system will ask for a password. Enter the password you set. If you haven't set a password before, just press Enter to enter.
After entering, the interface will display "Welcome to the MySQL monitor..."
Insert picture description here
Method 2 : Use the client connection tool that comes with MySQL SERVER to open
First, load and start MySQL on the MS-DOS command line and
then open the client connection tool that comes with MySQL SERVER ( Generally placed on the "Start" interface)
Insert picture description here
enter the password to enter.
The following figure shows the successful page.
Insert picture description here
Method 3 : Use the third-party software SQLyog to log in and connect to the MySQL server. After
starting MyQL, open SQLyog, enter the secret key, and create a new link to log in.
The following figure shows that the login was successful.
Insert picture description here

Three, MySQL service stop and uninstall

1. Stop the MySQL service
Enter the "net stop mysql" command on the MS-DOS command line to stop the service.
Insert picture description here

2. Use the MS-DOS command to uninstall the MySQL service.
Enter the "mysqld -remove mysql" command on the MS-DOS command line.
As shown in the figure below, the uninstallation was successful.
Insert picture description here
Note: The uninstall here does not delete the software from the computer. You can reload and start MySQL by entering the command.

Guess you like

Origin blog.csdn.net/weixin_45952057/article/details/108732511