MySQL add service, set password, change password

Source: Internet
Author: User

After MySQL is installed, you often need to do some more setup!

1. To add a MySQL service:

Enter command cmd

Enter the command CD D:\software\MySQL\mysqllocation\MySQLServer 5.7\bin (this directory is the MySQL installation directory)

input Command D: go to MySQL 's bin directory

Enter the command net start mysql57 to see if there is a MySQL service (mysql57 is the version of my database )

If there is a MySQL service, you can start the service directly

If the MySQL service does not exist, you can add the MySQL service by using the following command:

Start the MySQL Service installation command automatically running:

Mysqld.exe–install MySQL57

Boot not self-booting installation command:

Mysqld.exe–install-manual

2. To Open and delete a service command:

Open command:net start MySQL57

Delete command:net stop MySQL57

3. set or modify a password

After the MySQL Service command is turned on:

If the MySQL password has not been set before, then the default mysql password is empty!

Input:mysqladmin–uroot–p password will let you enter the password, directly enter!

Now let's enter a new password, then you can set a password you want to set, and then let you re-enter the new password again.

The password has been set successfully!

If you have previously set a password and need to change the password, enter:

Now the password has become empty!

4. go to MySQL database:

Input command:mysql–u–root–p

No password, the direct return, a password to enter the password!

Exit Database: Enter command:quit;

Word Document Download

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.