MySQL5.7.19 installation tutorial for Windows 10 how to modify the root password of MySQL,

Source: Internet
Author: User
Tags mysql gui

MySQL5.7.19 installation tutorial for Windows 10 how to modify the root password of MySQL,

Take MySQL5.7.19 as an example to download

Of course, the first is to download the https://dev.mysql.com/downloads/mysql/ official website.

Select a version suitable for your computer, click Download, jump, and Download it directly without thanks.

Wait for the download and decompress the package. Here is my decompression path D: \ MySQL

Start Installation

: Windows 10

: MySQL5.7.19

Decompress the package

However, you can create one without my. ini. just create a text document and change the suffix to ini.

[Client] # Set port 3306 to port 3306 [mysqld] # Set port 3306 to port 3306 # Set your MySQL installation directory basedir = D: \ MySQL # Set the data storage directory of your MySQL database datadir = D: \ MySQL \ data # maximum number of connections max_connections = 200 # The default character set used by the server is the 8-bit latin1 character set character-set-server = utf8 # default storage used when creating a new table engine default-storage-engine = INNODBsql_mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES [mysql] # set the default character set of the client default-character-set = utf8

The next step is to configure the environment variables.

This computer-> right-click, properties-> advanced system settings-> Environment Variables

Variable name: MYSQL_HOME

Variable value: installation path of MySQL

Next, add a Path and select "Path" to edit. Add one: % MYSQL_HOME % \ bin.

All the way.

To open a command prompt, you must have the Administrator permission. Otherwise, the permission is insufficient.

Cd/dD: \ MySQL \ bin to enter the bin directory. Enter the bin directory! Not written on the graph! Then, press the command in the figure.

Next, mysql-u root-p does not need a password to enter MySQL for the first time. Just press Enter. The password is required because I have installed it before.

Next, update the password.

MySQL5.7 has no PASSWORD field and has changed to authentication_string

SO:

Mysql> update mysql. user set anthentication_string = password ('your password') where user = 'root ';

Mysql> flush privileges; // refresh MySQL System Permissions

Mysql> quit;

The mysql-u root-p operation can be performed again.

Mysql> show databases;

You can also set up a MySQL GUI, such as SQLyog and Navicat.

Forgot root Password

The password may be forgotten after a long time.

See the graph.

First, stop the mysql service;

If it cannot be stopped:

Ctrlw.altw.delopen the task manager and upload the mysql.exe task in detail.

Enter the bin directory

Mysqld-nt -- skip-grant-tables

The command prompt cannot be used any more.

Open an administrator command prompt and enter mysql.

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.