mysql 5.7.11 winx64 initial password change

mysql 5.7.11 winx64 initial password change

Download the compressed version of MySQL-5.7.11-winx64 from the official website. After installing it, I found that there was a password. I tried it but it didn't work. I changed the password to fix it.

After successful installation:

Shut down the mysql service and modify the file my.ini in the following directory. The content is as follows: Note two points 1: The installation directory of mysql in the content is replaced with the installation directory of the reader; 2 The last line indicates whether a password is required for login. Here we bypass the password to log in to mysql to change the password, so skip-grant-tables is not commented

#####################Configuration file begins################### 
 
 # For advice on how to change settings please see 
 
 # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html 
 
 # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the 
 
 # *** default location during installation, and will be replaced if you 
 
 # *** upgrade to a newer version of MySQL. 
 
 [client] 
 
 default-character-set=utf8 
 
 
 
 [mysqld] 
 
 port=3306 
 # D:\Program Files\mysql-5.7.11-winx64\mysql-5.7.11-winx64 
 basedir="D:\Program Files\mysql-5.7.11-winx64\mysql-5.7.11-winx64/" 
 
 datadir = "D:\Program Files\mysql-5.7.11-winx64\mysql-5.7.11-winx64/data/" 
 
 tmpdir = "D:\Program Files\mysql-5.7.11-winx64\mysql-5.7.11-winx64/data/" 
 
 socket = "D:\Program Files\mysql-5.7.11-winx64\mysql-5.7.11-winx64/data/mysql.sock" 
 
 log-error="D:\Program Files\mysql-5.7.11-winx64\mysql-5.7.11-winx64/data/mysql_error.log" 
 
 
 
 #server_id = 2 
 
 #skip-locking 
 
 
 
 max_connections=100 
 
 table_open_cache=256 
 
 query_cache_size=1M 
 
 
 
 tmp_table_size=32M 
 
 thread_cache_size=8 
 
 
 
 innodb_data_home_dir="D:\Program Files\mysql-5.7.11-winx64\mysql-5.7.11-winx64/data/" 
 
 innodb_flush_log_at_trx_commit = 1 
 
 innodb_log_buffer_size=128M 
 
 innodb_buffer_pool_size=128M 
 
 innodb_log_file_size=10M 
 
 innodb_thread_concurrency=16 
 
 innodb-autoextend-increment=1000 
 
 join_buffer_size = 128M 
 
 sort_buffer_size = 32M 
 
 read_rnd_buffer_size = 32M 
 
 max_allowed_packet = 32M 
 
 explicit_defaults_for_timestamp=true 
 
 sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" 
 
 skip-grant-tables 
 
 
 
####################End of configuration file################### 

After the modification is saved, in cmd, since we have configured the environment variables in path, we can start mysql directly

net start mysql 

After successful startup, log in to mysql

mysql -u root -p 

The password is empty. Here we just press Enter to log in successfully. After successful login, we modify the database and execute as follows

use mysql
update user set authentication_string=password("123456") where user="root";

Note that a semicolon is required at the end

Refresh after success

flush privileges; 

At this point, our password has been changed successfully. Exit and shut down the MySQL service, then comment out the last line in my.ini, restart the MySQL service, and find that the new password is effective.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • mysql 5.7.18 winx64 password change
  • How to change the root password of Mysql5.7.10 on MAC
  • What to do if you forget your password in MySQL 5.7.17
  • Mysql5.7.14 installation and configuration method operation graphic tutorial (password problem solution)
  • MySQL 5.7.16 changes password prompt ERROR 1054 (42S22): Unknown column ''''password'''' in ''''field list'''' reason
  • Graphic tutorial on how to modify the initial password of Mysql5.7.11 under Windows
  • Summary of MySql5.7.11 compilation, installation and root password modification

<<:  Detailed steps for setting up host Nginx + Docker WordPress Mysql

>>:  Native js to achieve star twinkling effect

Recommend

Complete step record of vue encapsulation TabBar component

Table of contents Implementation ideas: Step 1: C...

Web page HTML code explanation: ordered list and unordered list

In this section, we will learn about list element...

JavaScript single thread and asynchronous details

Table of contents 1. Task Queue 2. To explain som...

MySQL time type selection

Table of contents DATETIME TIMESTAMP How to choos...

An Uncommon Error and Solution for SQL Server Full Backup

1. Error details Once when manually performing a ...

Analysis of problems caused by MySQL case sensitivity

MYSQL is case sensitive Seeing the words is belie...

Instructions for recovering data after accidental deletion of MySQL database

In daily operation and maintenance work, backup o...

MySQL 8.0.21 installation and configuration method graphic tutorial

Record the installation and configuration method ...

How to deploy hbase using docker

Standalone hbase, let’s talk about it first. Inst...

Transplanting the mkfs.vfat command in busybox under Linux system

In order to extend the disk life for storing audi...

CSS box hide/show and then the top layer implementation code

.imgbox{ width: 1200px; height: 612px; margin-rig...

mysql8.0 windows x64 zip package installation and configuration tutorial

MySQL 8 Windows version zip installation steps (d...

15 JavaScript functions worth collecting

Table of contents 1. Reverse the numbers 2. Get t...