Home > Database > Mysql Tutorial > body text

How to enter mysql in cmd?

青灯夜游
Release: 2019-05-23 18:55:47
Original
50718 people have browsed it

How to enter mysql in cmd?

Steps to enter mysql in cmd:

1. Press win r to open, enter cmd, and quickly open Command line interface, and then enter cmd

How to enter mysql in cmd?

How to enter mysql in cmd?

#2. Start the MySQL service

Use the following command:

net start myql
Copy after login

How to enter mysql in cmd?

3. Enter the mysql database

Enter the following command:

mysql -hlocalhost -uroot -p
Copy after login

How to enter mysql in cmd?

After executing the above command, it will You will be prompted to enter the password. Enter the password and press Enter. When the following interface is displayed, it means that the mysql database is successfully connected.

How to enter mysql in cmd?

#3. Enter "show databases" and press Enter to display the databases you own.

How to enter mysql in cmd?

Note: -h represents the server name, localhost represents the local area; -u is the database user name, root is the mysql default user name; -p is the password, if set The password can be entered directly in the link after -p, such as: -p123456; if the user does not set a password, just press Enter when Enter password is displayed.

The above is the detailed content of How to enter mysql in cmd?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!