Problems with changing password and connecting to Navicat when installing and using MySQL 8.0.16 under Windows 7

Problems with changing password and connecting to Navicat when installing and using MySQL 8.0.16 under Windows 7

I encountered several problems when installing MySQL. The answers I found online were similar and did not solve my problem very well. After completing the installation, I recorded them for easy reference later.

1. Download MySQL version 8.0.16 from the official website

2. Unzip and place the unzipped files in C:\Program Files\MySQL

3. Configure environment variables and add C:\Program Files\MySQL\bin to the system variable path

4. Add the configuration file and create my.ini in the MySQL root directory

The file content is as follows, modify the 'basedir=' and 'datadir=' addresses

[mysqld]
# Set port 3306 port=3306
# Set the installation directory of MySQL basedir=C:\Program Files\MySQL
# Set the storage directory of MySQL database data datadir=C:\MySQL\Database
# Maximum number of connections allowed max_connections=200
# The number of connection failures allowed. This is to prevent someone from trying to attack the database system from this host max_connect_errors = 10
# The default character set used by the server is UTF8
character-set-server=utf8
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB
# By default, the "mysql_native_password" plug-in is used for authentication. default_authentication_plugin=mysql_native_password
[mysql]
# Set the default character set of the mysql client to default-character-set=utf8
[client]
# Set the default port used by the mysql client to connect to the server port = 3306
default-character-set=utf8

5. Create a Data folder under Program Files\MySQL

6. Check the initial password

mysqld --initialize --console 
(The password is a string [Server] A temporary password is generated for root@localhost: q/4<l#jZ3***

If you can't remember, you can copy it into a text

7. Enter MySQL

mysql -u root -p 'Enter password (copy and paste from the document in the previous step)'

8. Change password

Navicat reports an error when using the default password to connect. As long as you can connect successfully in cmd, you only need to reset the password to use Navicat to connect

alter user root@localhost identified by 'new password'

9. Use Navicat or other tools to connect to MySQL with the new password.

Summarize

The above is what I introduced to you about installing and using MySQL8.0.16 under Windows7 to change the password and connect to Navicat. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Detailed explanation of the idea of ​​installing mysql8.0.11 and changing the root password and connecting navicat for mysql
  • How to correctly modify the ROOT password in MySql8.0 and above versions
  • Solve the problem of changing the password when logging in for the first time after installing MySQL 8.0
  • Summary of how to modify the root password in MySQL 5.7 and MySQL 8.0
  • MySQL 8.0.19 winx64 installation tutorial and change the initial password under Windows 10
  • MySQL 8.0.12 installation configuration method and password change
  • MySQL 8.0.15 installation and configuration graphic tutorial and password change under Linux
  • How to modify the root user password in mysql 8.0.16 winx64 and Linux
  • mysql8.0 forgotten password modification and net command service name invalid problem
  • The correct way to change the password in MySQL 8.0

<<:  WeChat applet implements simple chat room

>>:  How to deploy Angular project using Docker

Recommend

The difference between div and span in HTML (commonalities and differences)

Common points: The DIV tag and SPAN tag treat som...

Springboot+VUE to realize login and registration

This article example shares the specific code of ...

Perform data statistics on different values ​​of the same field in SQL

Application scenario: It is necessary to count th...

Vue.set() and this.$set() usage and difference

When we use Vue for development, we may encounter...

Use HTML and CSS to create your own warm man "Dabai"

The final result is like this, isn’t it cute… PS:...

How to install PHP7.4 and Nginx on Centos

Prepare 1. Download the required installation pac...

Implementation of IP address configuration in Centos7.5

1. Before configuring the IP address, first use i...

Detailed explanation of Docker compose orchestration tool

Docker Compose Docker Compose is a tool for defin...

CSS Skills Collection - Classics among Classics

Remove the dotted box on the link Copy code The co...

Use momentJs to make a countdown component (example code)

Today I'd like to introduce a countdown made ...

Docker image export, import and copy example analysis

The first solution is to push the image to a publ...