Background: has been used before or mysql5.5 version, in this re-import of the database, an exception occurred, a lot of file exception error, tried many times, should be my version is relatively old, need to improve, so directly download a mysql8.0 installation package Chinese version can be ‘

MYSQL 8.0 update install:

Mysql > select * from mysql-id where cd-service = mysql-id;

  1. Change the value of the my.init variable
[mysqld]
Set port 3306
port=3306
Set mysql installation directory
basedir=D:/softwareFile/mysql
Select * from mysql where mysql database data is stored
datadir=D:/softwareFile/mysql/Data
# Maximum number of connections allowed
max_connections=200
# Number of connections allowed to fail.
max_connect_errors=10
The default character set used by the server is UTf8mb4
character-set-server=utf8mb4
# Default storage engine that will be used when creating new tables
default-storage-engine=INNODB
# Default use "mysql_native_password" plug-in authentication
#mysql_native_password
default_authentication_plugin=mysql_native_password
[mysql]
Set default character set for mysql client
default-character-set=utf8mb4
[client]
Set the default port used by mysql clients to connect to servers
port=3306
default-character-set=utf8mb4

Copy the code

We need to add an environment variable:

  1. CMD, open as administrator;

  1. Initialize password:

Mysqld – initialize – the console

  1. Intercept password: Keep it

ho6! 1tZ0fQk0

6. Install mysqld -install

  1. Start the mysql

  1. Run the mysql -u root -p command to obtain the temporary password

Pay attention to upper and lower case passwords;

  1. Enter the change password and user

ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘123456’;

I can make any changes I want,

Then my Navicat data facility is available;