Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to log in to mysql

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to log in mysql, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

1. Four principles of mysql login

1.TCP/IP

TCP/IP socket login method is a login method provided by MySQL in all service platforms, and it is also a method with the largest number of applications in the Internet. This method creates a login application based on the Internet on the TCP/IP login. Generally, the mobile client is on one server, while the MySQL instance is on another network server, and the two devices log in according to the TCP/IP protocol.

2.Unix Socket

In Linux and Unix natural environments, you can log in using Unix domain sockets. But Unix domain socket is not actually a network layer protocol, so only the application MySQL mobile phone client and database instance are applied on the same network server.

This method must be specific in the server's configuration document: socket=/tmp/mysql.sock.

3.named pipe

This method can be used to log in only in the windows environment, and the performance is 30%, 50% better than the tcp/ip method.

4.shared memory

After version 4.1, mysql also provides a shared memory login method for windows system software. Because this login method can hardly be described in detail, the advantages and disadvantages of this method are not particularly clear.

II. Startup and termination of mysql services

The opening of the MySQL service is a prerequisite for a successful login of MySQL. Start or terminate the MySQL service with the following statement.

Mysql > net start mysqlmysql > net stop mysql III. Mysql login method

1.CMD command line login

When the MySQL service is turned on, you can log in to the MySQL database according to the mobile client. On the other hand, under the Windows operating system, you can log in to MySQL using cmd.

The actual operation flow of logging in to the MySQL database query is as follows:

1) Click "start" → "Windows system" → "Command prompt".

2) Open the cmd page, enter the following command, and press enter to execute.

Cd C:\ Program Files\ MySQL\ MySQL Server8.0\ bin\

3) enter the following login command at the command prompt page to log in to the MySQL database. The system will remind you to enter the password (Enter password), enter the login password set in the configuration, after the authentication is passed, you can log in to the MySQL database.

Mysql-h 127.0.0.1-u root-p

-mysql is the login instruction

The main parameter after-h is the host address of the network server, enter localhost or IP address

-u is followed by the name of the user who logs in to the database, here is root

-p is followed by the user's login password.

4) after the login is successful, go to the original MySQL page and the welcome slogan "Welcome to the MySQL monitor" will appear. At the same time, when the dialog box appears as shown in the figure, and the command prompt changes to "mysql >", it means that you have successfully logged in to the MySQL server and can actually operate on the database.

2.Mysql cmd login

Generally speaking, for the newly installed mysql, if you check to enable mysql lineclient when configuring, you can go directly through "start-mysql-mysql command lineclient". After clicking to enter, you will be reminded to enter the root login password. After the verification, you successfully logged in to the mysql server.

3. Third-party mysql login tool

According to the third-party database login tool, the whole login process will be more intuitive and simple, just set the main parameters. After logging in, there will also be a more personalized user interface. Navicat is highly recommended in terms of tools, and the page is simple and beautiful.

Thank you for reading this article carefully. I hope the article "how to sign in mysql" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report