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

SQL method for calculating timestamp difference

SQL method for calculating timestamp difference O...

MySQL 5.7.18 version free installation configuration tutorial

MySQL is divided into installation version and fr...

Example of ellipsis when CSS multi-line text overflows

Ellipses appear when multi-line text overflows Th...

MySQL database architecture details

Table of contents 1. MySQL Architecture 2. Networ...

How to install docker on Linux system and log in to docker container through ssh

Note: I use Centos to install docker Step 1: Inst...

Implementation of communication between Vue and Flask

Install axios and implement communication Here we...

Linux /etc/network/interfaces configuration interface method

The /etc/network/interfaces file in Linux is used...

How to completely uninstall node and npm on mac

npm uninstall sudo npm uninstall npm -g If you en...

Introduction to Enterprise Production MySQL Optimization

Compared with other large databases such as Oracl...

A brief analysis of the count tracking of a request in nginx

First, let me explain the application method. The...

In-depth understanding of MySQL master-slave replication thread state transition

Preface The basic principle of MySQL master-slave...

Gradient slide effect implemented by CSS3

Achieve results Code html <div class="css...

Analysis of MySQL example DTID master-slave principle

Table of contents 1. Basic Concepts of GTID 2. GT...

HTML simple shopping quantity applet

This article shares a simple HTML shopping quanti...