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

Detailed explanation of JSON.parse and JSON.stringify usage

Table of contents JSON.parse JSON.parse Syntax re...

JavaScript+html to implement front-end page sliding verification (2)

This article example shares the specific code of ...

A simple method to be compatible with IE6's min-width and min-height

If a website is widescreen, you drag the browser ...

Example of how nginx implements dynamic and static separation

Table of contents Deploy nginx on server1 Deploy ...

Understand CSS3 FlexBox elastic layout in 10 minutes

Basic Introduction Features Flexbox is a CSS disp...

Idea deployment tomcat service implementation process diagram

First configure the project artifacts Configuring...

Detailed analysis of MySQL master-slave delay phenomenon and principle

1. Phenomenon In the early morning, an index was ...

Implementation of element multiple form validation

In the project, form testing is often encountered...

12 Laws of Web Design for Clean Code [Graphic]

Beautiful code is the foundation of a beautiful we...

Practical record of MySQL 5.6 master-slave error reporting

1. Problem symptoms Version: MySQL 5.6, using the...

MySQL database backup and recovery implementation code

Database backup #grammar: # mysqldump -h server-u...

How to use multi-core CPU to speed up your Linux commands (GNU Parallel)

Have you ever had the need to compute a very larg...