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

The method of opening mysql on the command line

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly introduces the method of opening mysql on the command line, the article is very detailed, has a certain reference value, interested friends must read it!

The way to open mysql on the command line: first type "net start mysql" in the cmd command line; then enter "mysql-hlocalhost-uroot-p", enter the mysql account password, and enter to open the mysql database.

The method of opening mysql on the cmd command line

1. Windows icon in the lower left corner of the desktop-enter cmd in the search box, and click cmd.exe, or use the shortcut key Windows (a key with a Windows logo on the keyboard) + R to enter cmd and enter enter.

2, start the mysql database: enter net start mysql in the DOS command window, or use the shortcut key Windows (a key with a Windows logo on the keyboard) + R to enter net start mysql directly and enter enter. (attached: the command to close is net stop mysql)

3. Enter mysql-hlocalhost-uroot-p in the DOS command window to enter the mysql database, where-h represents the server name, localhost represents the local;-u is the database user name, root is the default mysql user name;-p is the password. If you set the password, you can enter it directly after-p, such as:-p123456, the user does not set the password, when Enter password is displayed, enter directly.

Note that if your mysql is not installed on disk C, you need to first use the DOS command to enter the bin directory under mysql's installation directory. Take my computer as an example, the method is as follows: enter D: enter D disk, enter cd D:\ Tools\ MySQL5.5.25\ bin to enter the bin directory of mysql before you can enter mysql-hlocalhost-uroot-p

4. When this interface is displayed, it indicates a successful link to the mysql database.

5. Enter show databases; to show your database (commands in the mysql database must end with a semicolon ";")

6. If you want to exit the mysql database, enter exit; to enter.

The above is all the contents of the method of opening mysql on the command line. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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