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:
|
<<: Detailed steps for setting up host Nginx + Docker WordPress Mysql
>>: Native js to achieve star twinkling effect
The search binary tree implementation in JavaScri...
Record the problem points of MySQL production. Bu...
System environment: Redis version: 6.0.8 Docker v...
Table of contents Logical Layering Separate busin...
[LeetCode] 180. Consecutive Numbers Write a SQL q...
Use js to control the light switch for your refer...
top command is the best command that everyone is ...
Table of contents 1. Location / Matching 2. Locat...
MySQL is the most popular relational database man...
The following situations were discovered during d...
Pessimistic Lock Pessimistic lock, considers the ...
Table of contents 1. Environment Configuration 1....
How to deploy Oracle using Docker on Mac First in...
Deploy database based on docker sudo docker pull ...
1. Install less dependency: npm install less less...