MySQL Official Tutorial

Source: Internet
Author: User

1.installation

2.setup Environment variables

Add%/mysql server/bin to path.

Then restart Cmd/powershell

3.invoking MySQL Programs

Command interpreter represents with Shell>

Enter the program name followed by any options or other arguments.

Shell> is not part of the input

About options:

1. Parameters also single or double dash start to specify program options. After the abbreviation short form, double followed by full write long form.

Abbreviations in the middle with a space or not even spaces, the middle of the full name equals sign.

2.option Case Sensitive-V for--verbose and-v for--version.

3. Some options are followed by option names, such as-h localhost or--host=localhost

The particularity of 4.password

5. Within option names, Dash ( - ) and underscore ( _ ) may be used interchangeably. For example, and is --skip-grant-tables --skip_grant_tables equivalent. (however, the leading dashes cannot be given as underscores.)

6.Numeric value can be represented with K,m,g 1024,1024^2,1024^3

e.g. Mysqladmin--count=1k--sleep=10 Ping

K can be lowercase k.

7. Values that contain spaces must be enclosed in quotation marks.

There are several ways to specify options for MySQL programs:

A) List the options on the command line following the program name. This was common for options, the apply to a specific invocation of

tions the highest.

4.reset Password

The official website tutorial is more detailed.

Https://dev.mysql.com/doc/mysql-windows-excerpt/8.0/en/resetting-permissions-windows.html

Perhaps for security reasons, Google has several methods, either for the old version, or for the forgotten password to change the password.

If you know the password or no password, it is easier to change the password to another or null.

Assume that the environment variable is configured, otherwise it needs to be started in cmd in the bin directory of server 8.0.

Direct Shell>mysql-u root[or username if changed] [-p] (if set PWD) log in.

Then enter in the console:

ALTER USER ' root ' @' localhost ' identified by ' Mynewpass ';

If Mynewpass is empty, there is no password.

ALTER USER [email protected]localhost identified by ' Mynewpass ';

is also equivalent.

MySQL Official Tutorial

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.