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 use the command line to connect to a MySQL database

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Under Windows operating system, start-run, open the "run" dialog box, enter cmd, and click "OK" to enter the DOS window.

DOS window enter the command to log in to the MySQL database

Mysql-h 127.0.0.1-u root-p

The command parameter description:

Mysql is the command to log in to the database, followed by the IP of the server. Because the MySql server in this example is installed locally, the IP address is 127.0.0.1, followed by the user name. In this example, the root user is logged in;-p is followed by the login password.

Enter the above command, enter the login password, and then log in to the MySQL database service. Then you can run the use databaseName statement to operate on a database.

These are the details of what the mysql command to open the database is, please pay more attention to other related articles!

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