Home > Database > Mysql Tutorial > body text

How to start and use mysql database

王林
Release: 2023-05-26 19:40:04
forward
4206 people have browsed it

Start MySQL as a background service

Enter at the command line: net start mysql

It will show that the MySQL service has been started successfully. success.

Note: If an error message of "access denied" appears here, run in administrator mode.

Close the MySQL service

Enter at the command line: net stop mysql

It will show that the MySQL service has been stopped successfully. success.

Start MySQL in command mode

Enter the following command to run: mysqld --console

Note: This The command does not require administrator rights. This way to start the MySQL server, once the open command prompt is closed, the service will also be shut down.

Using this method, you can see the console output of the database for easy debugging.

Note, because the service will stop after closing the command prompt in this way, you need to open another command prompt to perform SQL operations.

Log in to MySQL account

Directly enter mysql -u username -p in the command line to log in to the MySQL command line.

-u, followed by the username.

After entering the command, you need to enter the password.

Enter the MySQL command line to use the command line to perform SQL operations.

The above is the detailed content of How to start and use mysql database. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
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