mysql8.0 window installation

1. Create a my.ini file
to specify the installation directory and data directory

 eg:

[client]
default-character-set=utf8mb4

[mysqld]
lower_case_table_names=1
default-storage-engine=INNODB
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
basedir=E:/developertools/mysql8.0/mysql-8.0.11-winx64
datadir=E:/developertools/mysql8.0/mysql-8.0.11-winx64/data/
port=33068
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
default_authentication_plugin=mysql_native_password

[mysql]
default-character-set=utf8mb4

2. Use the administrator command to open the cmd box, enter the bin directory and execute mysqld --initialize --console
The initial password of version 8.0 will appear in [Note] [MY-010454] [Server] A temporary password is generated for root@localhost : F&gzjKrio3!#
3. Install the service mysqld -install MYSQL8.0
4. Start the service net start MYSQL8.0
5. Modify the password mysql -uroot -p (or modify it with the navitcat tool)

Pay attention to the password format:
because many database tools and link packages currently do not support "caching_sha2_password", for the sake of convenience, I have temporarily changed back to the "mysql_native_password" authentication plugin.
[mysqld]
default_authentication_plugin=mysql_native_password

Delete service:
sc delete MYSQY8.0

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324974548&siteId=291194637